   Generated by Sphinx 3.3.1.

BTrees Documentation
********************

     BTrees 4.7.2, Dec 02, 2020

     Zope Foundation Contributors

     Copyright © 2012, Zope Foundation Contributors

This package contains a set of persistent object containers built around
a modified BTree data structure.  The trees are optimized for use inside
ZODB’s “optimistic concurrency” paradigm, and include explicit
resolution of conflicts detected by that mechanism.

Contents:

 — The Detailed Node Listing —

Overview

API Reference

Protocol APIs

BTree Data Structure Variants

Integer Keys

Long Integer Keys

Object Keys

Quad Unsigned Integer Keys

Unsigned Integer Keys

Developer Information

Macros

The BTREE_SEARCH Macro

The BUCKET_SEARCH Macro

BTrees Changelog

4.0.0 (2012-10-20)

1 Overview
**********

When programming with the ZODB, Python dictionaries aren’t always what
you need.  The most important case is where you want to store a very
large mapping.  When a Python dictionary is accessed in a ZODB, the
whole dictionary has to be unpickled and brought into memory.  If you’re
storing something very large, such as a 100,000-entry user database,
unpickling such a large object will be slow.  BTrees are a balanced tree
data structure that behave like a mapping but distribute keys throughout
a number of tree nodes.  The nodes are stored in sorted order (this has
important consequences – see below).  Nodes are then only unpickled and
brought into memory as they’re accessed, so the entire tree doesn’t have
to occupy memory (unless you really are touching every single key).

1.1 Related Data Structures
===========================

The BTrees package provides a large collection of related data
structures.  The most general data structures store arbitrary
ordered objects.  There are variants of the data structures
specialized to numbers, which are faster and more memory efficient than
those dealing with objects.  There are several modules that handle the
different variants.  The first two letters of the module name specify
the types of the keys and values in mappings.  For example, the
BTrees.IOBTree module provides a mapping with 32-bit integer keys
and arbitrary objects as values.  Data Type Notation

Letter                        Mnemonic Device               Data Type                     Notes

------------------------------------------------------------------------------------------------------------------------

O                             “Object”                      Any sortable Python object

I                             “Integer”                     32-bit signed integer         Values from ‘-2**31 - 1’
                                                                                          through ‘2**31 - 1’ (about
                                                                                          plus or minus two billion)

L                             “Long integer”                64-bit signed integer         Values from ‘-2**63 - 1’
                                                                                          through ‘2**63 - 1’ (about
                                                                                          plus or minus nine
                                                                                          quintillion)

F                             “Float”                       32-bit C-language ‘float’     New in ZODB 3.4

U                             “Unsigned”                    32-bit unsigned integer       (New in BTrees 4.7.0)
                                                                                          Values from 0 through
                                                                                          ‘2**32’ (about four
                                                                                          billion)

Q                             “Quad”                        64-bit unsigned integer       Values from 0 through
                                                                                          ‘2**64’ (about 18
                                                                                          quintillion) (New in BTrees
                                                                                          4.7.0)

The four data structures provide by each module are a BTree, a Bucket, a
TreeSet, and a Set.  The BTree and Bucket types are mappings and support
all the usual mapping methods, e.g.  see update() and
keys().  The TreeSet and Set types are similar to mappings but they
have no values; they support the methods that make sense for a mapping
with no keys, e.g.  see keys() but not items().  The
Bucket and Set types are the individual building blocks for BTrees and
TreeSets, respectively.  A Bucket or Set can be used when you are sure
that it will have few elements.  If the data structure will grow large,
you should use a BTree or TreeSet.  Like Python lists, Buckets and Sets
are allocated in one contiguous piece, and insertions and deletions can
take time proportional to the number of existing elements.  Also like
Python lists, a Bucket or Set is a single object, and is pickled and
unpickled in its entirety.  BTrees and TreeSets are multi-level tree
structures with much better (logarithmic) worst- case time bounds, and
the tree structure is built out of multiple objects, which ZODB can load
individually as needed.

The two letter prefixes are repeated in the data types names.  For
example, the BTrees.OOBTree module defines the following
types: BTrees.OOBTree.OOBTree, BTrees.OOBTree.OOBucket,
see BTrees.OOBTree.OOSet, and BTrees.OOBTree.OOTreeSet.
Similarly, the other modules each define their own variants of
those four types.

For convenience, BTrees groups the most closely related data structures
together into a “family” (defined by
BTrees.Interfaces.IBTreeFamily).  BTrees.family32 groups
32-bit data structures, while BTrees.family64 contains 64-bit
data structures.  It is a common practice for code that creates BTrees
to be parameterized on the family so that the caller can choose the
desired characteristics.

1.2 Behaviour
=============

The ‘keys’, ‘values()’, and ‘items()’ methods on BTree and TreeSet types
do not materialize a list with all of the data.  Instead, they return
lazy sequences that fetch data from the BTree as needed.  They also
support optional arguments to specify the minimum and maximum values to
return, often called “range searching”.  Because all these types are
stored in sorted order, range searching is very efficient.

The ‘keys()’, ‘values()’, and ‘items()’ methods on Bucket and Set types
do return lists with all the data.  Starting in ZODB 3.3, there are also
‘iterkeys()’, ‘itervalues()’, and ‘iteritems()’ methods that return
iterators (in the Python 2.2 sense).  Those methods also apply to BTree
and TreeSet objects.

A BTree object supports all the methods you would expect of a mapping,
with a few extensions that exploit the fact that the keys are sorted.
The example below demonstrates how some of the methods work.  The extra
methods are ‘minKey()’ and ‘maxKey()’, which find the minimum and
maximum key value subject to an optional bound argument, and
‘byValue()’, which should probably be ignored (it’s hard to explain
exactly what it does, and as a result it’s almost never used – best to
consider it deprecated).  The various methods for enumerating keys,
values and items also accept minimum and maximum key arguments (“range
search”), and (new in ZODB 3.3) optional Boolean arguments to control
whether a range search is inclusive or exclusive of the range’s
endpoints.

     >>> from BTrees.OOBTree import OOBTree
     >>> t = OOBTree()
     >>> t.update({1: "red", 2: "green", 3: "blue", 4: "spades"})
     >>> len(t)
     4
     >>> t[2]
     'green'
     >>> s = t.keys() # this is a "lazy" sequence object
     >>> s
     <OOBTreeItems object at ...>
     >>> len(s)  # it acts like a Python list
     4
     >>> s[-2]
     3
     >>> list(s) # materialize the full list
     [1, 2, 3, 4]
     >>> list(t.values())
     ['red', 'green', 'blue', 'spades']
     >>> list(t.values(1, 2)) # values at keys in 1 to 2 inclusive
     ['red', 'green']
     >>> list(t.values(2))    # values at keys >= 2
     ['green', 'blue', 'spades']
     >>> list(t.values(min=1, max=4))  # keyword args new in ZODB 3.3
     ['red', 'green', 'blue', 'spades']
     >>> list(t.values(min=1, max=4, excludemin=True, excludemax=True))
     ['green', 'blue']
     >>> t.minKey()     # smallest key
     1
     >>> t.minKey(1.5)  # smallest key >= 1.5
     2
     >>> [k for k in t.keys()]
     [1, 2, 3, 4]
     >>> [k for k in t]    # new in ZODB 3.3
     [1, 2, 3, 4]
     >>> [pair for pair in t.iteritems()]  # new in ZODB 3.3
     [(1, 'red'), (2, 'green'), (3, 'blue'), (4, 'spades')]
     >>> t.has_key(4)  # returns a true value
     True
     >>> t.has_key(5)
     False
     >>> 4 in t  # new in ZODB 3.3
     True
     >>> 5 in t  # new in ZODB 3.3
     False
     >>>

Each of the modules also defines some functions that operate on BTrees –
see difference(), union(), and intersection().
The difference() function returns a Bucket, while the other
two methods return a Set.  If the keys are integers, then the module
also defines multiunion().  If the values are integers or
floats, then the module also defines weightedIntersection().
and weightedUnion().  The function doc strings describe each
function briefly.

Interfaces defines the operations, and is the official
documentation.  Note that the interfaces don’t define the concrete types
returned by most operations, and you shouldn’t rely on the concrete
types that happen to be returned: stick to operations guaranteed by the
interface.  In particular, note that the interfaces don’t specify
anything about comparison behavior, and so nothing about it is
guaranteed.  In ZODB 3.3, for example, two BTrees happen to use Python’s
default object comparison, which amounts to comparing the (arbitrary but
fixed) memory addresses of the BTrees.  This may or may not be true in
future releases.  If the interfaces don’t specify a behavior, then
whether that behavior appears to work, and exactly happens if it does
appear to work, are undefined and should not be relied on.

1.3 Total Ordering and Persistence
==================================

The BTree-based data structures differ from Python dicts in several
fundamental ways.  One of the most important is that while dicts require
that keys support hash codes and equality comparison, the BTree-based
structures don’t use hash codes and require a total ordering on keys.

Total ordering means three things:

  1. Reflexive.  For each `x', ‘x == x’ is true.

  2. Trichotomy.  For each `x' and `y', exactly one of ‘x < y’, ‘x ==
     y’, and ‘x > y’ is true.

  3. Transitivity.  Whenever ‘x <= y’ and ‘y <= z’, it’s also true that
     ‘x <= z’.

The default comparison functions for most objects that come with Python
satisfy these rules, with some crucial cautions explained later.
Complex numbers are an example of an object whose default comparison
function does not satisfy these rules: complex numbers only support ‘==’
and ‘!=’ comparisons, and raise an exception if you try to compare them
in any other way.  They don’t satisfy the trichotomy rule, and must not
be used as keys in BTree-based data structures (although note that
complex numbers can be used as keys in Python dicts, which do not
require a total ordering).

Examples of objects that are wholly safe to use as keys in BTree-based
structures include ints, longs, floats, 8-bit strings, Unicode strings,
and tuples composed (possibly recursively) of objects of wholly safe
types.

It’s important to realize that even if two types satisfy the rules on
their own, mixing objects of those types may not.  For example, 8-bit
strings and Unicode strings both supply total orderings, but mixing the
two loses trichotomy; e.g., ‘'x' < chr(255)’ and ‘u'x' == 'x'’, but
trying to compare ‘chr(255)’ to ‘u'x'’ raises an exception.  Partly for
this reason (another is given later), it can be dangerous to use keys
with multiple types in a single BTree-based structure.  Don’t try to do
that, and you don’t have to worry about it.

Another potential problem is mutability: when a key is inserted in a
BTree- based structure, it must retain the same order relative to the
other keys over time.  This is easy to run afoul of if you use mutable
objects as keys.  For example, lists supply a total ordering, and then

     >>> L1, L2, L3 = [1], [2], [3]
     >>> from BTrees.OOBTree import OOSet
     >>> s = OOSet((L2, L3, L1))  # this is fine, so far
     >>> list(s.keys())           # note that the lists are in sorted order
     [[1], [2], [3]]
     >>> s.has_key([3])           # and [3] is in the set
     True
     >>> L2[0] = 5                # horrible -- the set is insane now
     >>> s.has_key([3])           # for example, it's insane this way
     False
     >>> s
     OOSet([[1], [5], [3]])
     >>>

Key lookup relies on that the keys remain in sorted order (an efficient
form of binary search is used).  By mutating key L2 after inserting it,
we destroyed the invariant that the OOSet is sorted.  As a result, all
future operations on this set are unpredictable.

A subtler variant of this problem arises due to persistence: by default,
Python does several kinds of comparison by comparing the memory
addresses of two objects.  Because Python never moves an object in
memory, this does supply a usable (albeit arbitrary) total ordering
across the life of a program run (an object’s memory address doesn’t
change).  But if objects compared in this way are used as keys of a
BTree-based structure that’s stored in a database, when the objects are
loaded from the database again they will almost certainly wind up at
different memory addresses.  There’s no guarantee then that if key K1
had a memory address smaller than the memory address of key K2 at the
time K1 and K2 were inserted in a BTree, K1’s address will also be
smaller than K2’s when that BTree is loaded from a database later.  The
result will be an insane BTree, where various operations do and don’t
work as expected, seemingly at random.

Now each of the types identified above as “wholly safe to use” never
compares two instances of that type by memory address, so there’s
nothing to worry about here if you use keys of those types.  The most
common mistake is to use keys that are instances of a user-defined class
that doesn’t supply its own ‘__cmp__()’ method.  Python compares such
instances by memory address.  This is fine if such instances are used as
keys in temporary BTree-based structures used only in a single program
run.  It can be disastrous if that BTree-based structure is stored to a
database, though.

     >>> class C:
     ...     pass
     ...
     >>> a, b = C(), C()
     >>> print(a < b)   # this may print 0 if you try it
     True
     >>> del a, b
     >>> a, b = C(), C()
     >>> print(a < b)   # and this may print 0 or 1
     False
     >>>

That example illustrates that comparison of instances of classes that
don’t define ‘__cmp__()’ yields arbitrary results (but consistent
results within a single program run).

Another problem occurs with instances of classes that do define
‘__cmp__()’, but define it incorrectly.  It’s possible but rare for a
custom ‘__cmp__()’ implementation to violate one of the three required
formal properties directly.  It’s more common for it to “fall back” to
address-based comparison by mistake.  For example,

     >>> class Mine:
     ...     def __cmp__(self, other):
     ...         if other.__class__ is Mine:
     ...             return cmp(self.data, other.data)
     ...         else:
     ...             return cmp(self.data, other)

It’s quite possible there that the else(1) clause allows a result to be
computed based on memory address.  The bug won’t show up until a
BTree-based structure uses objects of class ‘Mine’ as keys, and also
objects of other types as keys, and the structure is loaded from a
database, and a sequence of comparisons happens to execute the else(2)
clause in a case where the relative order of object memory addresses
happened to change.

This is as difficult to track down as it sounds, so best to stay far
away from the possibility.

You’ll stay out of trouble by follwing these rules, violating them only
with great care:

  1. Use objects of simple immutable types as keys in BTree-based data
     structures.

  2. Within a single BTree-based data structure, use objects of a single
     type as keys.  Don’t use multiple key types in a single structure.

  3. If you want to use class instances as keys, and there’s any
     possibility that the structure may be stored in a database, it’s
     crucial that the class define a ‘__cmp__()’ method, and that the
     method is carefully implemented.

     Any part of a comparison implementation that relies (explicitly or
     implicitly) on an address-based comparison result will eventually
     cause serious failure.

  4. Do not use Persistent(3) objects as keys, or objects of a subclass
     of Persistent(4).

That last item may be surprising.  It stems from details of how conflict
resolution is implemented: the states passed to conflict resolution do
not materialize persistent subobjects (if a persistent object P is a key
in a BTree, then P is a subobject of the bucket containing P). Instead,
if an object O references a persistent subobject P directly, and O is
involved in a conflict, the states passed to conflict resolution contain
an instance of an internal ‘PersistentReference’ stub class everywhere O
references P. Two ‘PersistentReference’ instances compare equal if and
only if they “represent” the same persistent object; when they’re not
equal, they compare by memory address, and, as explained before,
memory-based comparison must never happen in a sane persistent BTree.
Note that it doesn’t help in this case if your Persistent(5) subclass
defines a sane ‘__cmp__()’ method: conflict resolution doesn’t know
about your class, and so also doesn’t know about its ‘__cmp__()’ method.
It only sees instances of the internal ‘PersistentReference’ stub class.

   ---------- Footnotes ----------

   (1) https://docs.python.org/3/reference/compound_stmts.html#else

   (2) https://docs.python.org/3/reference/compound_stmts.html#else

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (5)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

1.4 Iteration and Mutation
==========================

As with a Python dictionary or list, you should not mutate a BTree-based
data structure while iterating over it, except that it’s fine to replace
the value associated with an existing key while iterating.  You won’t
create internal damage in the structure if you try to remove, or add new
keys, while iterating, but the results are undefined and unpredictable.
A weak attempt is made to raise RuntimeError(1) if the size of a
BTree-based structure changes while iterating, but it doesn’t catch most
such cases, and is also unreliable.  Example

     >>> from BTrees.IIBTree import IISet
     >>> s = IISet(range(10))
     >>> list(s)
     [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
     >>> for i in s:  # the output is undefined
     ...     print(i)
     ...     s.remove(i)
     0
     2
     4
     6
     8
     Traceback (most recent call last):
       File "<stdin>", line 1, in ?
     RuntimeError: the bucket being iterated changed size
     >>> list(s)      # this output is also undefined
     [1, 3, 5, 7, 9]
     >>>

Also as with Python dictionaries and lists, the safe and predictable way
to mutate a BTree-based structure while iterating over it is to iterate
over a copy of the keys.  Example

     >>> from BTrees.IIBTree import IISet
     >>> s = IISet(range(10))
     >>> for i in list(s.keys()):  # this is well defined
     ...     print(i)
     ...     s.remove(i)
     0
     1
     2
     3
     4
     5
     6
     7
     8
     9
     >>> list(s)
     []
     >>>

   ---------- Footnotes ----------

   (1) https://docs.python.org/3/library/exceptions.html#RuntimeError

1.5 BTree node sizes
====================

BTrees (and TreeSets) are made up of a tree of Buckets (and Sets) and
internal nodes.  There are maximum sizes of these notes configured for
the various key and value types (unsigned and quad unsigned follow
integer and long, respectively):

Key Type     Value Type     Maximum Bucket or Set Size     Maximum BTree or TreeSet Size

---------------------------------------------------------------------------------------------

Integer      Float          120                            500

Integer      Integer        120                            500

Integer      Object         60                             500

Long         Float          120                            500

Long         Long           120                            500

Long         Object         60                             500

Object       Integer        60                             250

Object       Long           60                             250

Object       Object         30                             250

For your application, especially when using object keys or values, you
may want to override the default sizes.  You can do this by subclassing
any of the BTree (or TreeSet) classes and specifying new values for
‘max_leaf_size’ or ‘max_internal_size’ in your subclass:

     >>> import BTrees.OOBTree

     >>> class MyBTree(BTrees.OOBTree.BTree):
     ...     max_leaf_size = 500
     ...     max_internal_size = 1000

‘max_leaf_size’ is used for leaf nodes in a BTree, either Buckets or
Sets.  ‘max_internal_size’ is used for internal nodes, either BTrees or
TreeSets.

1.6 BTree Diagnostic Tools
==========================

A BTree (or TreeSet) is a complex data structure, really a graph of
variable- size nodes, connected in multiple ways via three distinct
kinds of C pointers.  There are some tools available to help check
internal consistency of a BTree as a whole.

Most generally useful is the check module.  The check()
function examines a BTree (or Bucket, Set, or TreeSet) for
value-based consistency, such as that the keys are in strictly
increasing order.  See the function docstring for details.  The
display() function displays the internal structure of a BTree.

BTrees and TreeSets also have a ‘_check()’ method.  This verifies that
the (possibly many) internal pointers in a BTree or TreeSet are mutually
consistent, and raises AssertionError(1) if they’re not.

If a check() or ‘_check()’ call fails, it may point to a bug
in the implementation of BTrees or conflict resolution, or may point to
database corruption.

Repairing a damaged BTree is usually best done by making a copy of it.
For example, if `self.data' is bound to a corrupted IOBTree,

     >>> self.data = IOBTree(self.data)

usually suffices.  If object identity needs to be preserved,

     >>> acopy = IOBTree(self.data)
     >>> self.data.clear()
     >>> self.data.update(acopy)

does the same, but leaves `self.data' bound to the same object.

   ---------- Footnotes ----------

   (1) https://docs.python.org/3/library/exceptions.html#AssertionError

2 API Reference
***************

2.1 Protocol APIs
=================

 -- Interface: BTrees.Interfaces.ICollection

      -- Method: clear ()

          Remove all of the items from the collection.

      -- Method: __nonzero__ ()

          Check if the collection is non-empty.

          Return a true value if the collection is non-empty and a false
          value otherwise.

 -- Interface: BTrees.Interfaces.IReadSequence

      -- Method: __getitem__ (index)

          Return the value at the given index.

          An IndexError(1) is raised if the index cannot be found.

      -- Method: __getslice__ (index1, index2)

          Return a subsequence from the original sequence.

          The subsequence includes the items from index1 up to, but not
          including, index2.

 -- Interface: BTrees.Interfaces.IKeyed

     Extends: BTrees.Interfaces.ICollection.

      -- Method: has_key (key)

          Check whether the object has an item with the given key.

          Return a true value if the key is present, else a false value.

      -- Method: keys (min=None, max=None, excludemin=False,
               excludemax=False)

          Return an IReadSequence containing the keys in the
          collection.

          The type of the IReadSequence is not specified.  It
          could be a list or a tuple or some other type.

          All arguments are optional, and may be specified as keyword
          arguments, or by position.

          If a min is specified, then output is constrained to keys
          greater than or equal to the given min, and, if excludemin is
          specified and true, is further constrained to keys strictly
          greater than min.  A min value of None is ignored.  If min is
          None or not specified, and excludemin is true, the smallest
          key is excluded.

          If a max is specified, then output is constrained to keys less
          than or equal to the given max, and, if excludemax is
          specified and true, is further constrained to keys strictly
          less than max.  A max value of None is ignored.  If max is
          None or not specified, and excludemax is true, the largest key
          is excluded.

      -- Method: maxKey (key=None)

          Return the maximum key.

          If a key argument if provided and not None, return the largest
          key that is less than or equal to the argument.  Raise an
          exception if no such key exists.

      -- Method: minKey (key=None)

          Return the minimum key.

          If a key argument if provided and not None, return the
          smallest key that is greater than or equal to the argument.
          Raise an exception if no such key exists.

 -- Interface: BTrees.Interfaces.ISetMutable

     Extends: BTrees.Interfaces.IKeyed.

      -- Method: insert (key)

          Add the key (value) to the set.

          If the key was already in the set, return 0, otherwise return
          1.

      -- Method: remove (key)

          Remove the key from the set.

          Raises KeyError(2) if key is not in the set.

      -- Method: update (seq)

          Add the items from the given sequence to the set.

 -- Interface: BTrees.Interfaces.ISized

     An object that supports __len__.

      -- Method: __len__ ()

          Return the number of items in the container.

 -- Interface: BTrees.Interfaces.IKeySequence

     Extends: BTrees.Interfaces.IKeyed,
     BTrees.Interfaces.ISized.

      -- Method: __getitem__ (index)

          Return the key in the given index position.

          This allows iteration with for loops and use in functions,
          like map and list, that read sequences.

 -- Interface: BTrees.Interfaces.IMinimalDictionary

     Extends: BTrees.Interfaces.ISized,
     BTrees.Interfaces.IKeyed.

      -- Method: get (key, default)

          Get the value associated with the given key.

          Return the default if has_key() is false with the
          given key.

      -- Method: __getitem__ (key)

          Get the value associated with the given key.

          Raise KeyError(3) if has_key() is false with the
          given key.

      -- Method: __setitem__ (key, value)

          Set the value associated with the given key.

      -- Method: __delitem__ (key)

          Delete the value associated with the given key.

          Raise class:‘KeyError’ if has_key() is false with
          the given key.

      -- Method: values (min=None, max=None, excludemin=False,
               excludemax=False)

          Return an BTrees.Interfaces.IReadSequence.
          containing the values in the collection.

          The type of the IReadSequence is not specified.  It
          could be a list or a tuple or some other type.

          All arguments are optional, and may be specified as keyword
          arguments, or by position.

          If a min is specified, then output is constrained to values
          whose keys are greater than or equal to the given min, and, if
          excludemin is specified and true, is further constrained to
          values whose keys are strictly greater than min.  A min value
          of None is ignored.  If min is None or not specified, and
          excludemin is true, the value corresponding to the smallest
          key is excluded.

          If a max is specified, then output is constrained to values
          whose keys are less than or equal to the given max, and, if
          excludemax is specified and true, is further constrained to
          values whose keys are strictly less than max.  A max value of
          None is ignored.  If max is None or not specified, and
          excludemax is true, the value corresponding to the largest key
          is excluded.

      -- Method: items (min=None, max=None, excludemin=False,
               excludemax=False)

          Return an BTrees.Interfaces.IReadSequence.
          containing the items in the collection.

          An item is a 2-tuple, a (key, value) pair.

          The type of the BTrees.Interfaces.IReadSequence is
          not specified.  It could be a list or a tuple or some other
          type.

          All arguments are optional, and may be specified as keyword
          arguments, or by position.

          If a min is specified, then output is constrained to items
          whose keys are greater than or equal to the given min, and, if
          excludemin is specified and true, is further constrained to
          items whose keys are strictly greater than min.  A min value
          of None is ignored.  If min is None or not specified, and
          excludemin is true, the item with the smallest key is
          excluded.

          If a max is specified, then output is constrained to items
          whose keys are less than or equal to the given max, and, if
          excludemax is specified and true, is further constrained to
          items whose keys are strictly less than max.  A max value of
          None is ignored.  If max is None or not specified, and
          excludemax is true, the item with the largest key is excluded.

 -- Interface: BTrees.Interfaces.IDictionaryIsh

     Extends: BTrees.Interfaces.IMinimalDictionary.

      -- Method: update (collection)

          Add the items from the given collection object to the
          collection.

          The input collection must be a sequence of (key, value)
          2-tuples, or an object with an ‘items’ method that returns a
          sequence of (key, value) pairs.

      -- Method: byValue (minValue)

          Return a sequence of (value, key) pairs, sorted by value.

          Values < minValue are omitted and other values are
          “normalized” by the minimum value.  This normalization may be
          a noop, but, for integer values, the normalization is
          division.

      -- Method: setdefault (key, d)

          D.setdefault(k, d) -> D.get(k, d), also set D[k]=d if k not in
          D.

          Return the value like get() except that if key is
          missing, d is both returned and inserted into the dictionary
          as the value of k.

          Note that, unlike as for Python’s dict.setdefault()(4), d is
          not optional.  Python defaults d to None, but that doesn’t
          make sense for mappings that can’t have None as a value (for
          example, an IIBTree can have only integers as
          values).

      -- Method: pop (key, d)

          D.pop(k[, d]) -> v, remove key and return the corresponding
          value.

          If key is not found, d is returned if given, otherwise
          KeyError(5) is raised.

 -- Interface: BTrees.Interfaces.IMerge

     Object with methods for merging sets, buckets, and trees.

     These methods are supplied in modules that define collection
     classes with particular key and value types.  The operations apply
     only to collections from the same module.  For example, the
     ‘BTrees.IIBTree.IIBTree.union()’ can only be used with
     IIBTree, IIBucket, IISet, and
     IITreeSet.

     The implementing module has a value type.  The IOBTree.
     and OOBTree modules have object value type.  The
     IIBTree and OIBTree modules have integer value
     types.  Other modules may be defined in the future that have other
     value types.

     The individual types are classified into set (Set and TreeSet) and
     mapping (Bucket and BTree) types.

      -- Method: difference (c1, c2)

          Return the keys or items in c1 for which there is no key in
          c2.

          If c1 is None, then None is returned.  If c2 is None, then c1
          is returned.

          If neither c1 nor c2 is None, the output is a Set if c1 is a
          Set or TreeSet, and is a Bucket if c1 is a Bucket or BTree.

      -- Method: union (c1, c2)

          Compute the Union of c1 and c2.

          If c1 is None, then c2 is returned, otherwise, if c2 is None,
          then c1 is returned.

          The output is a Set containing keys from the input
          collections.

      -- Method: intersection (c1, c2)

          Compute the intersection of c1 and c2.

          If c1 is None, then c2 is returned, otherwise, if c2 is None,
          then c1 is returned.

          The output is a Set containing matching keys from the input
          collections.

 -- Interface: BTrees.Interfaces.IIMerge

     Extends: BTrees.Interfaces.IMerge.

     Merge collections with integer value type.

     A primary intent is to support operations with no or integer
     values, which are used as “scores” to rate indiviual keys.  That
     is, in this context, a BTree or Bucket is viewed as a set with
     scored keys, using integer scores.

      -- Method: weightedUnion (c1, c2, weight1=1, weight2=1)

          Compute the weighted union of c1 and c2.

          If c1 and c2 are None, the output is (0, None).

          If c1 is None and c2 is not None, the output is (weight2, c2).

          If c1 is not None and c2 is None, the output is (weight1, c1).

          Else, and hereafter, c1 is not None and c2 is not None.

          If c1 and c2 are both sets, the output is 1 and the
          (unweighted) union of the sets.

          Else the output is 1 and a Bucket whose keys are the union of
          c1 and c2’s keys, and whose values are:

               v1*weight1 + v2*weight2

               where:

                 v1 is 0        if the key is not in c1
                       1        if the key is in c1 and c1 is a set
                       c1[key]  if the key is in c1 and c1 is a mapping

                 v2 is 0        if the key is not in c2
                       1        if the key is in c2 and c2 is a set
                       c2[key]  if the key is in c2 and c2 is a mapping

          Note that c1 and c2 must be collections.

      -- Method: weightedIntersection (c1, c2, weight1=1, weight2=1)

          Compute the weighted intersection of c1 and c2.

          If c1 and c2 are None, the output is (0, None).

          If c1 is None and c2 is not None, the output is (weight2, c2).

          If c1 is not None and c2 is None, the output is (weight1, c1).

          Else, and hereafter, c1 is not None and c2 is not None.

          If c1 and c2 are both sets, the output is the sum of the
          weights and the (unweighted) intersection of the sets.

          Else the output is 1 and a Bucket whose keys are the
          intersection of c1 and c2’s keys, and whose values are:

               v1*weight1 + v2*weight2

               where:

                 v1 is 1        if c1 is a set
                       c1[key]  if c1 is a mapping

                 v2 is 1        if c2 is a set
                       c2[key]  if c2 is a mapping

          Note that c1 and c2 must be collections.

 -- Interface: BTrees.Interfaces.IMergeIntegerKey

     Extends: BTrees.Interfaces.IMerge.

     See IMerge.-able objects with integer keys.

     Concretely, this means the types in ‘IOBTree’ and IIBTree.

      -- Method: multiunion (seq)

          Return union of (zero or more) integer sets, as an integer
          set.

          seq is a sequence of objects each convertible to an integer
          set.  These objects are convertible to an integer set:

             + An integer, which is added to the union.

             + A Set or TreeSet from the same module (for example, an
               BTrees.IIBTree.TreeSet for
               BTrees.IIBTree.multiunion()).  The elements of the
               set are added to the union.

             + A Bucket or BTree from the same module (for example, an
               BTrees.IOBTree.IOBTree for
               BTrees.IOBTree.multiunion()).  The keys of the
               mapping are added to the union.

          The union is returned as a Set from the same module (for
          example, see BTrees.IIBTree.multiunion() returns an
          BTrees.IIBTree.IISet).

          The point to this method is that it can run much faster than
          doing a sequence of two-input union() calls.  Under
          the covers, all the integers in all the inputs are sorted via
          a single linear-time radix sort, then duplicates are removed
          in a second linear-time pass.

   ---------- Footnotes ----------

   (1) https://docs.python.org/3/library/exceptions.html#IndexError

   (2) https://docs.python.org/3/library/exceptions.html#KeyError

   (3) https://docs.python.org/3/library/exceptions.html#KeyError

   (4) https://docs.python.org/3/library/stdtypes.html#dict.setdefault

   (5) https://docs.python.org/3/library/exceptions.html#KeyError

2.1.1 BTree Family APIs
-----------------------

 -- Interface: BTrees.Interfaces.ISet

     Extends: BTrees.Interfaces.IKeySequence,
     BTrees.Interfaces.ISetMutable.

 -- Interface: BTrees.Interfaces.ITreeSet

     Extends: BTrees.Interfaces.ISetMutable.

 -- Interface: BTrees.Interfaces.IBTree

     Extends: BTrees.Interfaces.IDictionaryIsh.

      -- Method: insert (key, value)

          Insert a key and value into the collection.

          If the key was already in the collection, then there is no
          change and 0 is returned.

          If the key was not already in the collection, then the item is
          added and 1 is returned.

          This method is here to allow one to generate random keys and
          to insert and test whether the key was there in one operation.

          A standard idiom for generating new keys will be:

               key = generate_key()
               while not t.insert(key, value):
                   key=generate_key()

 -- Interface: BTrees.Interfaces.IBTreeFamily

     the 64-bit or 32-bit family

      -- Attribute: IF

          The IIntegerFloatBTreeModule for this family

      -- Attribute: II

          The IIntegerIntegerBTreeModule for this family

      -- Attribute: IO

          The IIntegerObjectBTreeModule for this family

      -- Attribute: IU

          The IIntegerUnsignedBTreeModule for this family

      -- Attribute: UF

          The IUnsignedFloatBTreeModule for this family

      -- Attribute: UI

          The IUnsignedIntegerBTreeModule for this family

      -- Attribute: UO

          The IUnsignedObjectBTreeModule for this family

      -- Attribute: UU

          The IUnsignedUnsignedBTreeModule for this family

      -- Attribute: OI

          The IObjectIntegerBTreeModule for this family

      -- Attribute: OO

          The IObjectObjectBTreeModule for this family

      -- Attribute: OU

          The IObjectUnsignedBTreeModule for this family

      -- Attribute: maxint

          The maximum signed integer storable in this family

      -- Attribute: maxuint

          The maximum unsigned integer storable in this family

      -- Attribute: minint

          The minimum signed integer storable in this family

There are two families defined:

 -- Data: BTrees.family32 = <BTree family using 32 bits. Supports signed
          integer values from -2,147,483,648 to 2,147,483,647 and
          maximum unsigned integer value 4,294,967,295.>

     32-bit BTree family.

 -- Data: BTrees.family64 = <BTree family using 64 bits. Supports signed
          integer values from -9,223,372,036,854,775,808 to
          9,223,372,036,854,775,807 and maximum unsigned integer value
          18,446,744,073,709,551,615.>

     64-bit BTree family.

2.1.2 Module APIs
-----------------

 -- Interface: BTrees.Interfaces.IBTreeModule

     These are available in all modules (IOBTree, OIBTree, OOBTree,
     IIBTree, IFBTree, LFBTree, LOBTree, OLBTree, and LLBTree).

      -- Attribute: BTree

          The IBTree for this module.

          Also available as [prefix]BTree, as in IOBTree.

      -- Attribute: Bucket

          The leaf-node data buckets used by the BTree.

          (IBucket is not currently defined in this file, but is
          essentially IDictionaryIsh, with the exception of __nonzero__,
          as of this writing.)

          Also available as [prefix]Bucket, as in IOBucket.

      -- Attribute: TreeSet

          The ITreeSet for this module.

          Also available as [prefix]TreeSet, as in IOTreeSet.

      -- Attribute: Set

          The ISet for this module: the leaf-node data buckets used by
          the TreeSet.

          Also available as [prefix]BTree, as in IOSet.

 -- Interface: BTrees.Interfaces.IObjectObjectBTreeModule

     Extends: BTrees.Interfaces.IBTreeModule,
     BTrees.Interfaces.IMerge.

     keys, or set values, are objects; values are also objects.

     Object keys (and set values) must sort reliably (for instance,
     `not' on object id)!  Homogenous key types recommended.

     describes OOBTree

 -- Interface: BTrees.Interfaces.IIntegerObjectBTreeModule

     Extends: ‘BTrees.Interfaces._IMergeBTreeModule’

     keys, or set values, are signed integers; values are objects.

     describes IOBTree and LOBTree

 -- Interface: BTrees.Interfaces.IObjectIntegerBTreeModule

     Extends: ‘BTrees.Interfaces._IMergeBTreeModule’

     keys, or set values, are objects; values are signed integers.

     Object keys (and set values) must sort reliably (for instance,
     `not' on object id)!  Homogenous key types recommended.

     describes OIBTree and LOBTree

 -- Interface: BTrees.Interfaces.IIntegerIntegerBTreeModule

     Extends: ‘BTrees.Interfaces._IMergeBTreeModule’, see
     BTrees.Interfaces.IMergeIntegerKey.

     keys, or set values, are signed integers; values are also signed
     integers.

     describes IIBTree and LLBTree

 -- Interface: BTrees.Interfaces.IIntegerFloatBTreeModule

     Extends: ‘BTrees.Interfaces._IMergeBTreeModule’

     keys, or set values, are signed integers; values are floats.

     describes IFBTree and LFBTree

2.2 Utilities
=============

 -- Class: BTrees.Length.Length (v=0)

     Bases: persistent.Persistent(1)

     BTree lengths are often too expensive to compute.

     Objects that use BTrees need to keep track of lengths themselves.
     This class provides an object for doing this.

     As a bonus, the object support application-level conflict
     resolution.

     It is tempting to to assign length objects to __len__ attributes to
     provide instance-specific __len__ methods.  However, this no longer
     works as expected, because new-style classes cache class-defined
     slot methods (like __len__) in C type slots.  Thus,
     instance-defined slot fillers are ignored.

      -- Method: __call__ (*args)

          Return the current length value.

      -- Method: __getstate__ ()

          Get the object serialization state

          If the object has no assigned slots and has no instance
          dictionary, then None is returned.

          If the object has no assigned slots and has an instance
          dictionary, then the a copy of the instance dictionary is
          returned.  The copy has any items with names starting with
          ‘_v_’ or ‘_p_’ ommitted.

          If the object has assigned slots, then a two-element tuple is
          returned.  The first element is either None or a copy of the
          instance dictionary, as described above.  The second element
          is a dictionary with items for each of the assigned slots.

      -- Method: __init__ (v=0)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __setstate__ (v)

          Set the object serialization state

          The state should be in one of 3 forms:

             - None

               Ignored

             - A dictionary

               In this case, the object’s instance dictionary will be
               cleared and updated with the new state.

             - A two-tuple with a string as the first element.

               In this case, the method named by the string in the first
               element will be called with the second element.

               This form supports migration of data formats.

             - A two-tuple with None or a Dictionary as the first
               element and with a dictionary as the second element.

               If the first element is not None, then the object’s
               instance dictionary will be cleared and updated with the
               value.

               The items in the second element will be assigned as
               attributes.

      -- Method: change (delta)

          Add delta to the length value.

      -- Method: set (v)

          Set the length value to v.

      -- Attribute: __dict__ = mappingproxy({'__module__':
               'BTrees.Length', '__doc__': 'BTree lengths are often too
               expensive to compute.\n\n Objects that use BTrees need to
               keep track of lengths themselves.\n This class provides
               an object for doing this.\n\n As a bonus, the object
               support application-level conflict\n resolution.\n\n It
               is tempting to to assign length objects to __len__
               attributes\n to provide instance-specific __len__
               methods. However, this no\n longer works as expected,
               because new-style classes cache\n class-defined slot
               methods (like __len__) in C type slots. Thus,\n
               instance-defined slot fillers are ignored.\n ', 'value':
               0, '__init__': <function Length.__init__>,
               '__getstate__': <function Length.__getstate__>,
               '__setstate__': <function Length.__setstate__>, 'set':
               <function Length.set>, '_p_resolveConflict': <function
               Length._p_resolveConflict>, 'change': <function
               Length.change>, '__call__': <function Length.__call__>,
               '__dict__': <attribute '__dict__' of 'Length' objects>,
               '__weakref__': <attribute '__weakref__' of 'Length'
               objects>})

      -- Attribute: __module__ = 'BTrees.Length'

      -- Attribute: __weakref__

          list of weak references to the object (if defined)

      -- Attribute: value = 0

Utilities for working with BTrees (TreeSets, Buckets, and Sets) at a low
level.

The primary function is check(btree), which performs value-based
consistency checks of a kind ‘BTree._Tree._check()’ does not perform.
See the function docstring for details.

display(btree) displays the internal structure of a BTree (TreeSet, etc)
to stdout.

CAUTION: When a BTree node has only a single bucket child, it can be
impossible to get at the bucket from Python code (__getstate__() may
squash the bucket object out of existence, as a pickling storage
optimization).  In such a case, the code here synthesizes a temporary
bucket with the same keys (and values, if the bucket is of a mapping
type).  This has no first-order consequences, but can mislead if you pay
close attention to reported object addresses and/or object identity (the
synthesized bucket has an address that doesn’t exist in the actual
BTree).

 -- Class: BTrees.check.Checker (obj)

     Bases: BTrees.check.Walker.

      -- Method: __init__ (obj)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: check ()

      -- Method: check_sorted (obj, path, keys, lo, hi)

      -- Method: complain (msg, obj, path)

      -- Method: visit_btree (obj, path, parent, is_mapping, keys, kids,
               lo, hi)

      -- Method: visit_bucket (obj, path, parent, is_mapping, keys,
               values, lo, hi)

      -- Attribute: __module__ = 'BTrees.check'

 -- Class: BTrees.check.Printer (obj)

     Bases: BTrees.check.Walker.

      -- Method: __init__ (obj)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: display ()

      -- Method: visit_btree (obj, path, parent, is_mapping, keys, kids,
               lo, hi)

      -- Method: visit_bucket (obj, path, parent, is_mapping, keys,
               values, lo, hi)

      -- Attribute: __module__ = 'BTrees.check'

 -- Class: BTrees.check.Walker (obj)

     Bases: object(2)

      -- Method: __init__ (obj)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: visit_btree (obj, path, parent, is_mapping, keys, kids,
               lo, hi)

      -- Method: visit_bucket (obj, path, parent, is_mapping, keys,
               values, lo, hi)

      -- Method: walk ()

      -- Attribute: __dict__ = mappingproxy({'__module__':
               'BTrees.check', '__init__': <function Walker.__init__>,
               'visit_btree': <function Walker.visit_btree>,
               'visit_bucket': <function Walker.visit_bucket>, 'walk':
               <function Walker.walk>, '__dict__': <attribute '__dict__'
               of 'Walker' objects>, '__weakref__': <attribute
               '__weakref__' of 'Walker' objects>, '__doc__': None})

      -- Attribute: __module__ = 'BTrees.check'

      -- Attribute: __weakref__

          list of weak references to the object (if defined)

 -- Function: BTrees.check.check (btree)

     Check internal value-based invariants in a BTree or TreeSet.

     The ‘BTrees._base._Tree._check’ method checks internal C-level
     pointer consistency.  The check() function here checks
     value-based invariants: whether the keys in leaf bucket and
     internal nodes are in strictly increasing order, and whether they
     all lie in their expected range.  The latter is a subtle invariant
     that can’t be checked locally – it requires propagating range info
     down from the root of the tree, and modifying it at each level for
     each child.

     Raises AssertionError(3) if anything is wrong, with a string detail
     explaining the problems.  The entire tree is checked before
     AssertionError(4) is raised, and the string detail may be large
     (depending on how much went wrong).

 -- Function: BTrees.check.classify (obj)

 -- Function: BTrees.check.crack_btree (t, is_mapping)

 -- Function: BTrees.check.crack_bucket (b, is_mapping)

 -- Function: BTrees.check.display (btree)

     Display the internal structure of a BTree, Bucket, TreeSet or Set.

 -- Function: BTrees.check.type_and_adr (obj)

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2) https://docs.python.org/3/library/functions.html#object

   (3) https://docs.python.org/3/library/exceptions.html#AssertionError

   (4) https://docs.python.org/3/library/exceptions.html#AssertionError

2.3 BTree Data Structure Variants
=================================

2.3.1 Integer Keys
------------------

2.3.1.1 Float Values
....................

 -- Attribute: BTrees.IFBTree.BTree

     alias of BTrees.IFBTree.IFBTree.

 -- Attribute: BTrees.IFBTree.Bucket

     alias of BTrees.IFBTree.IFBucket.

 -- Class: BTrees.IFBTree.IFBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.IFBTree.IFBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.IFBTree.IFSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.IFBTree.IFTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.IFBTree.Set

     alias of BTrees.IFBTree.IFSet.

 -- Attribute: BTrees.IFBTree.TreeSet

     alias of BTrees.IFBTree.IFTreeSet.

 -- Function: BTrees.IFBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.IFBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.IFBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.IFBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.IFBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.IFBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.1.2 Integer Values
......................

 -- Attribute: BTrees.IIBTree.BTree

     alias of BTrees.IIBTree.IIBTree.

 -- Attribute: BTrees.IIBTree.Bucket

     alias of BTrees.IIBTree.IIBucket.

 -- Class: BTrees.IIBTree.IIBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.IIBTree.IIBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.IIBTree.IISet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.IIBTree.IITreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.IIBTree.Set

     alias of BTrees.IIBTree.IISet.

 -- Attribute: BTrees.IIBTree.TreeSet

     alias of BTrees.IIBTree.IITreeSet.

 -- Function: BTrees.IIBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.IIBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.IIBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.IIBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.IIBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.IIBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.1.3 Object Values
.....................

 -- Attribute: BTrees.IOBTree.BTree

     alias of BTrees.IOBTree.IOBTree.

 -- Attribute: BTrees.IOBTree.Bucket

     alias of BTrees.IOBTree.IOBucket.

 -- Class: BTrees.IOBTree.IOBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.IOBTree.IOBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.IOBTree.IOSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.IOBTree.IOTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.IOBTree.Set

     alias of BTrees.IOBTree.IOSet.

 -- Attribute: BTrees.IOBTree.TreeSet

     alias of BTrees.IOBTree.IOTreeSet.

 -- Function: BTrees.IOBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.IOBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.IOBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.IOBTree.union (o1, o2)

     compute the union of o1 and o2

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.1.4 Unsigned Integer Values
...............................

 -- Attribute: BTrees.IUBTree.BTree

     alias of BTrees.IUBTree.IUBTree.

 -- Attribute: BTrees.IUBTree.Bucket

     alias of BTrees.IUBTree.IUBucket.

 -- Class: BTrees.IUBTree.IUBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.IUBTree.IUBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.IUBTree.IUSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.IUBTree.IUTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.IUBTree.Set

     alias of BTrees.IUBTree.IUSet.

 -- Attribute: BTrees.IUBTree.TreeSet

     alias of BTrees.IUBTree.IUTreeSet.

 -- Function: BTrees.IUBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.IUBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.IUBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.IUBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.IUBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.IUBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.2 Long Integer Keys
-----------------------

2.3.2.1 Float Values
....................

 -- Attribute: BTrees.LFBTree.BTree

     alias of BTrees.LFBTree.LFBTree.

 -- Attribute: BTrees.LFBTree.Bucket

     alias of BTrees.LFBTree.LFBucket.

 -- Class: BTrees.LFBTree.LFBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.LFBTree.LFBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.LFBTree.LFSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.LFBTree.LFTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.LFBTree.Set

     alias of BTrees.LFBTree.LFSet.

 -- Attribute: BTrees.LFBTree.TreeSet

     alias of BTrees.LFBTree.LFTreeSet.

 -- Function: BTrees.LFBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.LFBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.LFBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.LFBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.LFBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.LFBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.2.2 Long Integer Values
...........................

 -- Attribute: BTrees.LLBTree.BTree

     alias of BTrees.LLBTree.LLBTree.

 -- Attribute: BTrees.LLBTree.Bucket

     alias of BTrees.LLBTree.LLBucket.

 -- Class: BTrees.LLBTree.LLBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.LLBTree.LLBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.LLBTree.LLSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.LLBTree.LLTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.LLBTree.Set

     alias of BTrees.LLBTree.LLSet.

 -- Attribute: BTrees.LLBTree.TreeSet

     alias of BTrees.LLBTree.LLTreeSet.

 -- Function: BTrees.LLBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.LLBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.LLBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.LLBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.LLBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.LLBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.2.3 Object Values
.....................

 -- Attribute: BTrees.LOBTree.BTree

     alias of BTrees.LOBTree.LOBTree.

 -- Attribute: BTrees.LOBTree.Bucket

     alias of BTrees.LOBTree.LOBucket.

 -- Class: BTrees.LOBTree.LOBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.LOBTree.LOBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.LOBTree.LOSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.LOBTree.LOTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.LOBTree.Set

     alias of BTrees.LOBTree.LOSet.

 -- Attribute: BTrees.LOBTree.TreeSet

     alias of BTrees.LOBTree.LOTreeSet.

 -- Function: BTrees.LOBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.LOBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.LOBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.LOBTree.union (o1, o2)

     compute the union of o1 and o2

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.2.4 Quad Unsigned Integer Values
....................................

 -- Attribute: BTrees.LQBTree.BTree

     alias of BTrees.LQBTree.LQBTree.

 -- Attribute: BTrees.LQBTree.Bucket

     alias of BTrees.LQBTree.LQBucket.

 -- Class: BTrees.LQBTree.LQBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.LQBTree.LQBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.LQBTree.LQSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.LQBTree.LQTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.LQBTree.Set

     alias of BTrees.LQBTree.LQSet.

 -- Attribute: BTrees.LQBTree.TreeSet

     alias of BTrees.LQBTree.LQTreeSet.

 -- Function: BTrees.LQBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.LQBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.LQBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.LQBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.LQBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.LQBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.3 Object Keys
-----------------

2.3.3.1 Integer Values
......................

 -- Attribute: BTrees.OIBTree.BTree

     alias of BTrees.OIBTree.OIBTree.

 -- Attribute: BTrees.OIBTree.Bucket

     alias of BTrees.OIBTree.OIBucket.

 -- Class: BTrees.OIBTree.OIBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.OIBTree.OIBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.OIBTree.OISet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.OIBTree.OITreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.OIBTree.Set

     alias of BTrees.OIBTree.OISet.

 -- Attribute: BTrees.OIBTree.TreeSet

     alias of BTrees.OIBTree.OITreeSet.

 -- Function: BTrees.OIBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.OIBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.OIBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.OIBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.OIBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.3.2 Long Integer Values
...........................

 -- Attribute: BTrees.OLBTree.BTree

     alias of BTrees.OLBTree.OLBTree.

 -- Attribute: BTrees.OLBTree.Bucket

     alias of BTrees.OLBTree.OLBucket.

 -- Class: BTrees.OLBTree.OLBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.OLBTree.OLBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.OLBTree.OLSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.OLBTree.OLTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.OLBTree.Set

     alias of BTrees.OLBTree.OLSet.

 -- Attribute: BTrees.OLBTree.TreeSet

     alias of BTrees.OLBTree.OLTreeSet.

 -- Function: BTrees.OLBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.OLBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.OLBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.OLBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.OLBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.3.3 Object Values
.....................

 -- Attribute: BTrees.OOBTree.BTree

     alias of BTrees.OOBTree.OOBTree.

 -- Attribute: BTrees.OOBTree.Bucket

     alias of BTrees.OOBTree.OOBucket.

 -- Class: BTrees.OOBTree.OOBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.OOBTree.OOBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.OOBTree.OOSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.OOBTree.OOTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.OOBTree.Set

     alias of BTrees.OOBTree.OOSet.

 -- Attribute: BTrees.OOBTree.TreeSet

     alias of BTrees.OOBTree.OOTreeSet.

 -- Function: BTrees.OOBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.OOBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.OOBTree.union (o1, o2)

     compute the union of o1 and o2

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.3.4 Quad Unsigned Integer Values
....................................

 -- Attribute: BTrees.OQBTree.BTree

     alias of BTrees.OQBTree.OQBTree.

 -- Attribute: BTrees.OQBTree.Bucket

     alias of BTrees.OQBTree.OQBucket.

 -- Class: BTrees.OQBTree.OQBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.OQBTree.OQBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.OQBTree.OQSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.OQBTree.OQTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.OQBTree.Set

     alias of BTrees.OQBTree.OQSet.

 -- Attribute: BTrees.OQBTree.TreeSet

     alias of BTrees.OQBTree.OQTreeSet.

 -- Function: BTrees.OQBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.OQBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.OQBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.OQBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.OQBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.3.5 Unsigned Integer Values
...............................

 -- Attribute: BTrees.OUBTree.BTree

     alias of BTrees.OUBTree.OUBTree.

 -- Attribute: BTrees.OUBTree.Bucket

     alias of BTrees.OUBTree.OUBucket.

 -- Class: BTrees.OUBTree.OUBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.OUBTree.OUBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.OUBTree.OUSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.OUBTree.OUTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.OUBTree.Set

     alias of BTrees.OUBTree.OUSet.

 -- Attribute: BTrees.OUBTree.TreeSet

     alias of BTrees.OUBTree.OUTreeSet.

 -- Function: BTrees.OUBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.OUBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.OUBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.OUBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.OUBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.4 Quad Unsigned Integer Keys
--------------------------------

2.3.4.1 Float Values
....................

 -- Attribute: BTrees.QFBTree.BTree

     alias of BTrees.QFBTree.QFBTree.

 -- Attribute: BTrees.QFBTree.Bucket

     alias of BTrees.QFBTree.QFBucket.

 -- Class: BTrees.QFBTree.QFBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.QFBTree.QFBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.QFBTree.QFSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.QFBTree.QFTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.QFBTree.Set

     alias of BTrees.QFBTree.QFSet.

 -- Attribute: BTrees.QFBTree.TreeSet

     alias of BTrees.QFBTree.QFTreeSet.

 -- Function: BTrees.QFBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.QFBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.QFBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.QFBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.QFBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.QFBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.4.2 Long Integer Values
...........................

 -- Attribute: BTrees.QLBTree.BTree

     alias of BTrees.QLBTree.QLBTree.

 -- Attribute: BTrees.QLBTree.Bucket

     alias of BTrees.QLBTree.QLBucket.

 -- Class: BTrees.QLBTree.QLBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.QLBTree.QLBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.QLBTree.QLSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.QLBTree.QLTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.QLBTree.Set

     alias of BTrees.QLBTree.QLSet.

 -- Attribute: BTrees.QLBTree.TreeSet

     alias of BTrees.QLBTree.QLTreeSet.

 -- Function: BTrees.QLBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.QLBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.QLBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.QLBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.QLBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.QLBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.4.3 Object Values
.....................

 -- Attribute: BTrees.QOBTree.BTree

     alias of BTrees.QOBTree.QOBTree.

 -- Attribute: BTrees.QOBTree.Bucket

     alias of BTrees.QOBTree.QOBucket.

 -- Class: BTrees.QOBTree.QOBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.QOBTree.QOBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.QOBTree.QOSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.QOBTree.QOTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.QOBTree.Set

     alias of BTrees.QOBTree.QOSet.

 -- Attribute: BTrees.QOBTree.TreeSet

     alias of BTrees.QOBTree.QOTreeSet.

 -- Function: BTrees.QOBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.QOBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.QOBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.QOBTree.union (o1, o2)

     compute the union of o1 and o2

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.4.4 Quad Unsigned Integer Values
....................................

 -- Attribute: BTrees.QQBTree.BTree

     alias of BTrees.QQBTree.QQBTree.

 -- Attribute: BTrees.QQBTree.Bucket

     alias of BTrees.QQBTree.QQBucket.

 -- Class: BTrees.QQBTree.QQBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.QQBTree.QQBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.QQBTree.QQSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.QQBTree.QQTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Attribute: BTrees.QQBTree.Set

     alias of BTrees.QQBTree.QQSet.

 -- Attribute: BTrees.QQBTree.TreeSet

     alias of BTrees.QQBTree.QQTreeSet.

 -- Function: BTrees.QQBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.QQBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.QQBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.QQBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.QQBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.QQBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.5 Unsigned Integer Keys
---------------------------

2.3.5.1 Float Values
....................

 -- Attribute: BTrees.UFBTree.BTree

     alias of BTrees.UFBTree.UFBTree.

 -- Attribute: BTrees.UFBTree.Bucket

     alias of BTrees.UFBTree.UFBucket.

 -- Attribute: BTrees.UFBTree.Set

     alias of BTrees.UFBTree.UFSet.

 -- Attribute: BTrees.UFBTree.TreeSet

     alias of BTrees.UFBTree.UFTreeSet.

 -- Class: BTrees.UFBTree.UFBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.UFBTree.UFBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.UFBTree.UFSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.UFBTree.UFTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Function: BTrees.UFBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.UFBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.UFBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.UFBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.UFBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.UFBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.5.2 Integer Values
......................

 -- Attribute: BTrees.UIBTree.BTree

     alias of BTrees.UIBTree.UIBTree.

 -- Attribute: BTrees.UIBTree.Bucket

     alias of BTrees.UIBTree.UIBucket.

 -- Attribute: BTrees.UIBTree.Set

     alias of BTrees.UIBTree.UISet.

 -- Attribute: BTrees.UIBTree.TreeSet

     alias of BTrees.UIBTree.UITreeSet.

 -- Class: BTrees.UIBTree.UIBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.UIBTree.UIBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.UIBTree.UISet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.UIBTree.UITreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Function: BTrees.UIBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.UIBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.UIBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.UIBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.UIBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.UIBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.5.3 Object Values
.....................

 -- Attribute: BTrees.UOBTree.BTree

     alias of BTrees.UOBTree.UOBTree.

 -- Attribute: BTrees.UOBTree.Bucket

     alias of BTrees.UOBTree.UOBucket.

 -- Attribute: BTrees.UOBTree.Set

     alias of BTrees.UOBTree.UOSet.

 -- Attribute: BTrees.UOBTree.TreeSet

     alias of BTrees.UOBTree.UOTreeSet.

 -- Class: BTrees.UOBTree.UOBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.UOBTree.UOBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.UOBTree.UOSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.UOBTree.UOTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Function: BTrees.UOBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.UOBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.UOBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.UOBTree.union (o1, o2)

     compute the union of o1 and o2

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

2.3.5.4 Unsigned Integer Values
...............................

 -- Attribute: BTrees.UUBTree.BTree

     alias of BTrees.UUBTree.UUBTree.

 -- Attribute: BTrees.UUBTree.Bucket

     alias of BTrees.UUBTree.UUBucket.

 -- Attribute: BTrees.UUBTree.Set

     alias of BTrees.UUBTree.UUSet.

 -- Attribute: BTrees.UUBTree.TreeSet

     alias of BTrees.UUBTree.UUTreeSet.

 -- Class: BTrees.UUBTree.UUBTree

     Bases: persistent.Persistent(1)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ () -> state

          Return the picklable state of the BTree.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ (state)

          Set the state of the BTree.

      -- Method: byValue (min) -> list of value, key pairs

          Returns list of value, key pairs where the value is >= min.
          The list is sorted by value.  Note that items() returns keys
          in the opposite order.

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: get (key[, default=None]) -> Value for key or default

          Return the value or the default if the key is not found.

      -- Method: has_key (key)

          Return true if the BTree contains the given key.

      -- Method: insert (key, value) -> 0 or 1

          Add an item if the key is not already used.  Return 1 if the
          item was added, or 0 otherwise.

      -- Method: items ([min, max]) -> – list of key, value pairs

          Returns the items of the BTree.  If min and max are supplied,
          only items with keys greater than min and less than max are
          returned.

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the BTree.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the BTree as the value of
          k.

      -- Method: update (collection)

          Add the items from the given collection.

      -- Method: values ([min, max]) -> list of values

          Returns the values of the BTree.  If min and max are supplied,
          only values corresponding to keys greater than min and less
          than max are returned.

 -- Class: BTrees.UUBTree.UUBucket

     Bases: persistent.Persistent(2)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __delitem__ (key, /)

          Delete self[key].

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          __getstate__() – Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setitem__ (key, value, /)

          Set self[key] to value.

      -- Method: __setstate__ ()

          __setstate__() – Set the state of the object

      -- Method: byValue ()

          byValue(min) – Return value-keys with values >= min and
          reverse sorted by values

      -- Method: clear ()

          clear() – Remove all of the items from the bucket

      -- Method: get ()

          get(key[,default]) – Look up a value

          Return the default (or None) if the key is not found.

      -- Method: has_key ()

          has_key(key) – Test whether the bucket contains the given key

      -- Method: items ()

          items([min, max])) – Return the items

      -- Method: iteritems ([min[, max]]) -> an iterator over the (key,
               value) items of B

      -- Method: iterkeys ([min[, max]]) -> an iterator over the keys of
               B

      -- Method: itervalues ([min[, max]]) -> an iterator over the
               values of B

      -- Method: keys ()

          keys([min, max]) – Return the keys

      -- Method: maxKey ()

          maxKey([key]) – Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ()

          minKey([key]) – Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: pop (k[, d]) -> v, remove key and return the
               corresponding value.

          If key is not found, d is returned if given, otherwise
          KeyError is raised.

      -- Method: setdefault (k, d) -> D.get(k, d), also set D[k]=d if k
               not in D.

          Return the value like get() except that if key is missing, d
          is both returned and inserted into the bucket as the value of
          k.

      -- Method: update ()

          update(collection) – Add the items from the given collection

      -- Method: values ()

          values([min, max]) – Return the values

 -- Class: BTrees.UUBTree.UUSet

     Bases: persistent.Persistent(3)

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getitem__ (key, /)

          Return self[key].

      -- Method: __getstate__ ()

          Return the picklable state of the object

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __repr__ ()

          Return repr(self).

      -- Method: __setstate__ ()

          Set the state of the object

      -- Method: add (id)

          Add a key to the set

      -- Method: clear ()

          Remove all of the items from the bucket

      -- Method: has_key (key)

          Test whether the bucket contains the given key

      -- Method: insert (id)

          Add a key to the set

      -- Method: keys ()

          Return the keys

      -- Method: maxKey ([key])

          Find the maximum key

          If an argument is given, find the maximum <= the argument

      -- Method: minKey ([key])

          Find the minimum key

          If an argument is given, find the minimum >= the argument

      -- Method: remove (id)

          Remove an id from the set

      -- Method: update (seq)

          Add the items from the given sequence to the set

 -- Class: BTrees.UUBTree.UUTreeSet

     Bases: persistent.Persistent(4)

      -- Method: __bool__ ()

          self != 0

      -- Method: __contains__ (key, /)

          Return key in self.

      -- Method: __getstate__ () -> state

          Return the picklable state of the TreeSet.

      -- Method: __init__ (*args, **kwargs)

          Initialize self.  See help(type(self)) for accurate signature.

      -- Method: __iter__ ()

          Implement iter(self).

      -- Method: __len__ ()

          Return len(self).

      -- Method: __new__ (**kwargs)

          Create and return a new object.  See help(type) for accurate
          signature.

      -- Method: __setstate__ (state)

          Set the state of the TreeSet.

      -- Method: add ()

          add(id) – Add an item to the set

      -- Method: clear ()

          Remove all of the items from the BTree.

      -- Method: has_key (key)

          Return true if the TreeSet contains the given key.

      -- Method: insert ()

          insert(id) – Add an item to the set

      -- Method: keys ([min, max]) -> list of keys

          Returns the keys of the TreeSet.  If min and max are supplied,
          only keys greater than min and less than max are returned.

      -- Method: maxKey ([max]) -> key

          Return the largest key in the BTree.  If max is specified,
          return the largest key <= max.

      -- Method: minKey ([mi]) -> key

          Return the smallest key in the BTree.  If min is specified,
          return the smallest key >= min.

      -- Method: remove ()

          remove(id) – Remove a key from the set

      -- Method: update (collection)

          Add the items from the given collection.

 -- Function: BTrees.UUBTree.difference (o1, o2)

     compute the difference between o1 and o2

 -- Function: BTrees.UUBTree.intersection (o1, o2)

     compute the intersection of o1 and o2

 -- Function: BTrees.UUBTree.multiunion (seq)

     compute union of a sequence of integer sets.

     Each element of seq must be an integer set, or convertible to one
     via the set iteration protocol.  The union returned is an IISet.

 -- Function: BTrees.UUBTree.union (o1, o2)

     compute the union of o1 and o2

 -- Function: BTrees.UUBTree.weightedIntersection (o1, o2[, w1, w2])

     compute the intersection of o1 and o2

     w1 and w2 are weights.

 -- Function: BTrees.UUBTree.weightedUnion (o1, o2[, w1, w2])

     compute the union of o1 and o2

     w1 and w2 are weights.

   ---------- Footnotes ----------

   (1)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (2)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (3)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

   (4)
https://persistent.readthedocs.io/en/latest/api/interfaces.html#persistent.Persistent

3 Developer Information
***********************

This document provides information for developers who maintain or extend
‘BTrees’.

3.1 Macros
==========

‘BTrees’ are defined using a “template”, roughly akin to a C++ template.
To create a new family of ‘BTrees’, create a source file that defines
macros used to handle differences in key and value types:

3.1.1 Configuration Macros
--------------------------

‘MASTER_ID’

     A string to hold an RCS/CVS Id key to be included in compiled
     binaries.

‘MOD_NAME_PREFIX’

     A string (like “IO” or “OO”) that provides the prefix used for the
     module.  This gets used to generate type names and the internal
     module name string.

‘DEFAULT_MAX_BUCKET_SIZE’

     An int giving the maximum bucket size (number of key/value pairs).
     When a bucket gets larger than this due to an insertion `into a
     BTREE', it splits.  Inserting into a bucket directly doesn’t split,
     and functions that produce a bucket output (e.g., ‘union()’) also
     have no bound on how large a bucket may get.  Someday this will be
     tunable on ‘BTree’.  instances.

‘DEFAULT_MAX_BTREE_SIZE’

     An ‘int’ giving the maximum size (number of children) of an
     internal btree node.  Someday this will be tunable on ‘BTree’
     instances.

3.1.2 Macros for Keys
---------------------

‘KEY_TYPE’

     The C type declaration for keys (e.g., ‘int’ or ‘PyObject*’).

‘KEY_TYPE_IS_PYOBJECT’

     Define if ‘KEY_TYPE’ is a ‘PyObject*`, else ``undef’.

‘KEY_CHECK(K)’

     Tests whether the ‘PyObject* K’ can be converted to the (‘C’) key
     type (‘KEY_TYPE’).  The macro should return a boolean (zero for
     false, non-zero for true).  When it returns false, its caller
     should probably set a ‘TypeError’ exception.

‘KEY_CHECK_ON_SET(K)’

     Like ‘KEY_CHECK’, but only checked during ‘__setitem__’.

‘TEST_KEY_SET_OR(V, K, T)’

     Like Python’s ‘cmp()’.  Compares K(ey) to T(arget), where ‘K’ and
     ‘T’ are ‘C’ values of type ‘KEY_TYPE’. ‘V’ is assigned an ‘int’
     value depending on the outcome:

           < 0 if K < T
          == 0 if K == T
           > 0 if K > T

     This macro acts like an ‘if’, where the following statement is
     executed only if a Python exception has been raised because the
     values could not be compared.

‘DECREF_KEY(K)’

     ‘K’ is a value of ‘KEY_TYPE’.  If ‘KEY_TYPE’ is a flavor of
     ‘PyObject*’, write this to do ‘Py_DECREF(K)’.  Else (e.g.,
     ‘KEY_TYPE’ is ‘int’) make it a nop.

‘INCREF_KEY(K)’

     ‘K’ is a value of ‘KEY_TYPE’. If ‘KEY_TYPE’ is a flavor of
     ‘PyObject*’, write this to do ‘Py_INCREF(K)’.  Else (e.g.,
     ‘KEY_TYPE’ is ‘int’) make it a nop.

‘COPY_KEY(K, E)’

     Like ‘K=E’.  Copy a key from ‘E’ to ‘K’, both of ‘KEY_TYPE’.  Note
     that this doesn’t ‘decref K’ or ‘incref E’ when ‘KEY_TYPE’ is a
     ‘PyObject*’; the caller is responsible for keeping refcounts
     straight.

‘COPY_KEY_TO_OBJECT(O, K)’

     Roughly like ‘O=K’.  ‘O’ is a ‘PyObject*’, and the macro must build
     a Python object form of ‘K’, assign it to ‘O’, and ensure that ‘O’
     owns the reference to its new value.  It may do this by creating a
     new Python object based on ‘K’ (e.g., ‘PyInt_FromLong(K)’ when
     ‘KEY_TYPE’ is ‘int’), or simply by doing ‘Py_INCREF(K)’ if
     ‘KEY_TYPE’ is a ‘PyObject*’.

‘COPY_KEY_FROM_ARG(TARGET, ARG, STATUS)’

     Copy an argument to the target without creating a new reference to
     ‘ARG’.  ‘ARG’ is a ‘PyObject*’, and ‘TARGET’ is of type ‘KEY_TYPE’.
     If this can’t be done (for example, ‘KEY_CHECK(ARG)’ returns
     false), set a Python error and set status to ‘0’.  If there is no
     error, leave status alone.

3.1.3 Macros for Values
-----------------------

‘VALUE_TYPE’

     The C type declaration for values (e.g., ‘int’ or ‘PyObject*’).

‘VALUE_TYPE_IS_PYOBJECT’

     Define if ‘VALUE_TYPE’ is a ‘PyObject*’, else ‘undef’.

‘TEST_VALUE(X, Y)’

     Like Python’s ‘cmp()’.  Compares ‘X’ to ‘Y’, where ‘X’ & ‘Y’ are
     ‘C’ values of type ‘VALUE_TYPE’.  The macro returns an ‘int’, with
     value:

           < 0 if X < Y
          == 0 if X == Y
           > 0 if X > Y

     Bug: There is no provision for determining whether the comparison
     attempt failed (set a Python exception).

‘DECREF_VALUE(K)’

     Like ‘DECREF_KEY’, except applied to values of ‘VALUE_TYPE’.

‘INCREF_VALUE(K)’

     Like ‘INCREF_KEY’, except applied to values of ‘VALUE_TYPE’.

‘COPY_VALUE(K, E)’

     Like ‘COPY_KEY’, except applied to values of ‘VALUE_TYPE’.

‘COPY_VALUE_TO_OBJECT(O, K)’

     Like ‘COPY_KEY_TO_OBJECT’, except applied to values of
     ‘VALUE_TYPE’.

‘COPY_VALUE_FROM_ARG(TARGET, ARG, STATUS)’

     Like ‘COPY_KEY_FROM_ARG’, except applied to values of ‘VALUE_TYPE’.

‘NORMALIZE_VALUE(V, MIN)’

     Normalize the value, ‘V’, using the parameter ‘MIN’.  This is
     almost certainly a YAGNI. It is a no-op for most types.  For
     integers, ‘V’ is replaced by ‘V/MIN’ only if ‘MIN > 0’.

3.1.4 Macros for Set Operations
-------------------------------

‘MERGE_DEFAULT’

     A value of ‘VALUE_TYPE’ specifying the value to associate with set
     elements when sets are merged with mappings via weighed union or
     weighted intersection.

‘MERGE(O1, w1, O2, w2)’

     Performs a weighted merge of two values, ‘O1’ and ‘O2’, using
     weights ‘w1’ and ‘w2’.  The result must be of ‘VALUE_TYPE’.  Note
     that weighted unions and weighted intersections are not enabled if
     this macro is left undefined.

‘MERGE_WEIGHT(O, w)’

     Computes a weighted value for ‘O’.  The result must be of
     ‘VALUE_TYPE’.  This is used for “filling out” weighted unions, i.e.
     to compute a weighted value for keys that appear in only one of the
     input mappings.  If left undefined, ‘MERGE_WEIGHT’ defaults to:

          #define MERGE_WEIGHT(O, w) (O)

‘MULTI_INT_UNION’

     The value doesn’t matter.  If defined, ‘SetOpTemplate.c’ compiles
     code for a ‘multiunion()’ function (compute a union of many input
     sets at high speed).  This currently makes sense only for
     structures with integer keys.

3.2 BTree Clues
===============

More or less random bits of helpful info.

   + In papers and textbooks, this flavor of BTree is usually called a
     B+-Tree, where “+” is a superscript.

   + All keys and all values live in the bucket leaf nodes.  Keys in
     interior (BTree) nodes merely serve to guide a search efficiently
     toward the correct leaf.

   + When a key is deleted, it’s physically removed from the bucket it’s
     in, but this doesn’t propagate back up the tree: since keys in
     interior nodes only serve to guide searches, it’s OK– and saves
     time –to leave “stale” keys in interior nodes.

   + No attempt is made to rebalance the tree after a deletion, unless a
     bucket thereby becomes entirely empty.  “Classic BTrees” do
     rebalance, keeping all buckets at least half full (provided there
     are enough keys in the entire tree to fill half a bucket).  The
     tradeoffs are murky.  Pathological cases in the presence of
     deletion do exist.  Pathologies include trees tending toward only
     one key per bucket, and buckets at differing depths (all buckets
     are at the same depth in a classic BTree).

   + ‘DEFAULT_MAX_BUCKET_SIZE’ and ‘DEFAULT_MAX_BTREE_SIZE’ are chosen
     mostly to “even out” pickle sizes in storage.  That’s why, e.g., an
     ‘IIBTree’ has larger values than an ‘OOBTree’: pickles store ints
     more efficiently than they can store arbitrary Python objects.

   + In a non-empty BTree, every bucket node contains at least one key,
     and every BTree node contains at least one child and a non-NULL
     firstbucket pointer.  However, a BTree node may not contain any
     keys.

   + An empty BTree consists solely of a BTree node with ‘len==0’ and
     ‘firstbucket==NULL’.

   + Although a BTree can become unbalanced under a mix of inserts and
     deletes (meaning both that there’s nothing stronger that can be
     said about buckets than that they’re not empty, and that buckets
     can appear at different depths), a BTree node always has children
     of the same kind: they’re all buckets, or they’re all BTree nodes.

3.3 The ‘BTREE_SEARCH’ Macro
============================

For notational ease, consider a fixed BTree node ‘x’, and let

     K(i) mean x->data.key[i]
     C(i) mean all the keys reachable from x->data.child[i]

For each ‘i’ in ‘0’ to ‘x->len-1’ inclusive,

     K(i) <= C(i) < K(i+1)

is a BTree node invariant, where we pretend that ‘K(0)’ holds a key
smaller than any possible key, and ‘K(x->len)’ holds a key larger than
any possible key.  (Note that ‘K(x->len)’ doesn’t actually exist, and
‘K(0)’ is never used although space for it exists in non-empty BTree
nodes.)

When searching for a key ‘k’, then, the child pointer we want to follow
is the one at index ‘i’ such that ‘K(i) <= k < K(i+1)’.  There can be at
most one such ‘i’, since the ‘K(i)’ are strictly increasing.  And there
is at least one such ‘i’ provided the tree isn’t empty (so that ‘0 <
len’).  For the moment, assume the tree isn’t empty (we’ll get back to
that later).

The macro’s chief loop invariant is

     K(lo) < k < K(hi)

This holds trivially at the start, since ‘lo’ is set to ‘0’, and ‘hi’ to
‘x->len’, and we pretend ‘K(0)’ is minus infinity and ‘K(len)’ is plus
infinity.  Inside the loop, if ‘K(i) < k’ we set ‘lo’ to ‘i’, and if
‘K(i) > k’ we set ‘hi’ to ‘i’.  These obviously preserve the invariant.
If ‘K(i) == k’, the loop breaks and sets the result to ‘i’, and since
‘K(i) == k’ in that case ‘i’ is obviously the correct result.

Other cases depend on how ‘i = floor((lo + hi)/2)’ works, exactly.
Suppose ‘lo + d = hi’ for some ‘d >= 0’.  Then ‘i = floor((lo + lo +
d)/2) = floor(lo + d/2) = lo + floor(d/2)’.  So:

  a. ‘[d == 0] (lo == i == hi)’ if and only if ‘(lo == hi)’.

  b. ‘[d == 1] (lo == i < hi)’ if and only if ‘(lo+1 == hi)’.

  c. ‘[d > 1] (lo < i < hi)’ if and only if ‘(lo+1 < hi)’.

If the node is empty ‘(x->len == 0)’, then ‘lo==i==hi==0’ at the start,
and the loop exits immediately (the first ‘i > lo’ test fails), without
entering the body.

Else ‘lo < hi’ at the start, and the invariant ‘K(lo) < k < K(hi)’
holds.

If ‘lo+1 < hi’, we’re in case (c): ‘i’ is strictly between ‘lo’ and
‘hi’, so the loop body is entered, and regardless of whether the body
sets the new ‘lo’ or the new ‘hi’ to ‘i’, the new ‘lo’ is strictly less
than the new ‘hi’, and the difference between the new ‘lo’ and new ‘hi’
is strictly less than the difference between the old ‘lo’ and old ‘hi’.
So long as the new ‘lo + 1’ remains < the new ‘hi’, we stay in this
case.  We can’t stay in this case forever, though: because ‘hi-lo’
decreases on each trip but remains > ‘0’, ‘lo+1 == hi’ must eventually
become true.  (In fact, it becomes true quickly, in about ‘log2(x->len)’
trips; the point is more that ‘lo’ doesn’t equal ‘hi’ when the loop
ends, it has to end with ‘lo+1==hi’ and ‘i==lo’).

Then we’re in case (b): ‘i==lo==hi-1’ then, and the loop exits.  The
invariant still holds, with ‘lo==i’ and ‘hi==lo+1==i+1’:

     K(i) < k < K(i+1)

so ‘i’ is again the correct answer.

3.3.1 Optimization points
-------------------------

   + Division by 2 is done via shift rather via “/2”.  These are signed
     ints, and almost all C compilers treat signed int division as
     truncating, and shifting is not the same as truncation for signed
     int division.  The compiler has no way to know these values aren’t
     negative, so has to generate longer-winded code for “/2”.  But we
     know these values aren’t negative, and exploit it.

   + The order of _cmp comparisons matters.  We’re in an interior BTree
     node, and are looking at only a tiny fraction of all the keys that
     exist.  So finding the key exactly in this node is unlikely, and
     checking ‘_cmp == 0’ is a waste of time to the same extent.  It
     doesn’t matter whether we check for ‘_cmp < 0’ or ‘_cmp > 0’ first,
     so long as we do both before worrying about equality.

   + At the start of a routine, it’s better to run this macro even if
     ‘x->len’ is ‘0’ (check for that afterwards).  We just called a
     function and so probably drained the pipeline.  If the first thing
     we do then is read up ‘self->len’ and check it against ‘0’, we just
     sit there waiting for the data to get read up, and then another
     immediate test-and-branch, and for a very unlikely case (BTree
     nodes are rarely empty).  It’s better to get into the loop right
     away so the normal case makes progress ASAP.

3.4 The ‘BUCKET_SEARCH’ Macro
=============================

This has a different job than ‘BTREE_SEARCH’: the key ‘0’ slot is
legitimate in a bucket, and we want to find the index at which the key
belongs.  If the key is larger than the bucket’s largest key, a new slot
at index len is where it belongs, else it belongs at the smallest ‘i’
with ‘keys[i]’ >= the key we’re looking for.  We also need to know
whether or not the key is present (‘BTREE_SEARCH’ didn’t care; it only
wanted to find the next node to search).

The mechanics of the search are quite similar, though.  The primary loop
invariant changes to (say we’re searching for key ‘k’):

     K(lo-1) < k < K(hi)

where ‘K(i)’ means ‘keys[i]’, and we pretend ‘K(-1)’ is minus infinity
and ‘K(len)’ is plus infinity.

If the bucket is empty, ‘lo=hi=i=0’ at the start, the loop body is never
entered, and the macro sets ‘INDEX’ to 0 and ‘ABSENT’ to true.  That’s
why ‘_cmp’ is initialized to 1 (‘_cmp’ becomes ‘ABSENT’).

Else the bucket is not empty, lo<hi at the start, and the loop body is
entered.  The invariant is obviously satisfied then, as ‘lo=0’ and
‘hi=len’.

If ‘K[i]<k’, ‘lo’ is set to ‘i+1’, preserving that ‘K(lo-1) = K[i] < k’.

If ‘K[i]>k’, ‘hi’ is set to ‘i’, preserving that ‘K[hi] = K[i] > k’.

If the loop exits after either of those, ‘_cmp != 0’, so ‘ABSENT’
becomes true.

If ‘K[i]=k’, the loop breaks, so that ‘INDEX’ becomes ‘i’, and ‘ABSENT’
becomes false (‘_cmp=0’ in this case).

The same case analysis for ‘BTREE_SEARCH’ on ‘lo’ and ‘hi’ holds here:

  a. ‘(lo == i == hi)’ if and only if ‘(lo == hi)’.

  b. ‘(lo == i < hi)’ if and only if ‘(lo+1 == hi)’.

  c. ‘(lo < i < hi)’ if and only if ‘(lo+1 < hi)’.

So long as ‘lo+1 < hi’, we’re in case (c), and either break with
equality (in which case the right results are obviously computed) or
narrow the range.  If equality doesn’t obtain, the range eventually
narrows to cases (a) or (b).

To go from (c) to (a), we must have ‘lo+2==hi’ at the start, and
‘K[i]=K[lo+1]<k’.  Then the new lo gets set to ‘i+1 = lo+2 = hi’, and
the loop exits with ‘lo=hi=i’ and ‘_cmp<0’.  This is correct, because we
know that ‘k != K(i)’ (loop invariant!  we actually know something
stronger, that ‘k < K(hi)’; since ‘i=hi’, this implies ‘k != K(i)’).

Else (c) eventually falls into case (b), ‘lo+1==hi’ and ‘i==lo’.  The
invariant tells us ‘K(lo-1) < k < K(hi) = K(lo+1)’, so if the key is
present it must be at ‘K(lo)’.  ‘i==lo’ in this case, so we test ‘K(lo)’
against ‘k’.  As always, if equality obtains we do the right thing, else
case #b becomes case (a).

When (b) becomes (a), the last comparison was non-equal, so ‘_cmp’ is
non-zero, and the loop exits because ‘lo==hi==i’ in case (a).  The
invariant then tells us ‘K(lo-1) < k < K(lo)’, so the key is in fact not
present, it’s correct to exit with ‘_cmp’ non-zero, and ‘i==lo’ is again
the index at which ‘k’ belongs.

3.4.1 Optimization points
-------------------------

   + As for ‘BTREE_SEARCH’, shifting of signed ints is cheaper than
     division.

   + Unlike as for ‘BTREE_SEARCH’, there’s nothing special about
     searching an empty bucket, and the macro computes thoroughly
     sensible results in that case.

   + The order of ‘_cmp’ comparisons differs from ‘BTREE_SEARCH’.  When
     searching a bucket, it’s much more likely (than when searching a
     BTree node) that the key is present, so testing ‘__cmp==0’ isn’t a
     systematic waste of cycles.  At the extreme, if all searches are
     successful (key present), on average this saves one comparison per
     search, against leaving the determination of ‘_cmp==0’ implicit (as
     ‘BTREE_SEARCH’ does).  But even on successful searches, ‘__cmp !=
     0’ is a more popular outcome than ‘__cmp == 0’ across iterations
     (unless the bucket has only a few keys), so it’s important to check
     one of the inequality cases first.  It turns out it’s better on
     average to check ‘K(i) < key’ (than to check ‘K(i) > key’), because
     when it pays it narrows the range more (we get a little boost from
     setting ‘lo=i+1’ in this case; the other case sets ‘hi=i’, which
     isn’t as much of a narrowing).

4.1 4.7.2 (2020-04-07)
======================

   - Fix more cases of C and Python inconsistency.  The C implementation
     now behaves like the Python implementation when it comes to integer
     overflow for the integer keys for ‘in’, ‘get’ and ‘has_key’.  Now
     they return False, the default value, and False, respectively in
     both versions if the tested value would overflow or underflow.
     Previously, the C implementation would raise ‘OverflowError’ or
     ‘KeyError’, while the Python implementation functioned as expected.
     See issue 140(1).

          Note: The unspecified true return values of ‘has_key’ have
          changed.

   ---------- Footnotes ----------

   (1) https://github.com/zopefoundation/BTrees/issues/140

4.2 4.7.1 (2020-03-22)
======================

   - Fix the definitions of ‘__all__’ in modules.  In 4.7.0, they
     incorrectly left out names.  See PR 132(1).

   - Ensure the interface resolution order of all objects is consistent.
     See issue 137(2).

   ---------- Footnotes ----------

   (1) https://github.com/zopefoundation/BTrees/pull/132

   (2) https://github.com/zopefoundation/BTrees/issues/137

4.3 4.7.0 (2020-03-17)
======================

   - Add unsigned variants of the trees.  These use the initial “U” for
     32-bit data and “Q” for 64-bit data (for “quad”, which is similar
     to what the C ‘printf’ function uses and the Python struct module
     uses).

   - Fix the value for ‘BTrees.OIBTree.using64bits’ when using the pure
     Python implementation (PyPy and when ‘PURE_PYTHON’ is in the
     environment).

   - Make the errors that are raised when values are out of range more
     consistent between Python 2 and Python 3 and between 32-bit and
     64-bit variants.

   - Make the Bucket types consistent with the BTree types as updated in
     versions 4.3.2: Querying for keys with default comparisons or that
     are not integers no longer raises ‘TypeError’.

4.4 4.6.1 (2019-11-07)
======================

   - Add support for Python 3.8.

4.5 4.6.0 (2019-07-30)
======================

   - Drop support for Python 3.4.

   - Fix tests against persistent 4.4.

   - Stop accidentally installing the ‘terryfy’ package in macOS wheels.
     See issue 98(1).

   - Fix segmentation fault in ‘bucket_repr()’.  See issue 106(2).

   ---------- Footnotes ----------

   (1) https://github.com/zopefoundation/BTrees/issues/98

   (2) https://github.com/zopefoundation/BTrees/issues/106

4.6 4.5.1 (2018-08-09)
======================

   - Produce binary wheels for Python 3.7.

   - Use pyproject.toml to specify build dependencies.  This requires
     pip 18 or later to build from source.

4.7 4.5.0 (2018-04-23)
======================

   - Add support for Python 3.6 and 3.7.

   - Drop support for Python 3.3.

   - Raise an ‘ImportError’ consistently on Python 3 if the C extension
     for BTrees is used but the ‘persistent’ C extension is not
     available.  Previously this could result in an odd
     ‘AttributeError’.  See
     ‘https://github.com/zopefoundation/BTrees/pull/55’

   - Fix the possibility of a rare crash in the C extension when
     deallocating items.  See
     ‘https://github.com/zopefoundation/BTrees/issues/75’

   - Respect the ‘PURE_PYTHON’ environment variable at runtime even if
     the C extensions are available.  See
     ‘https://github.com/zopefoundation/BTrees/issues/78’

   - Always attempt to build the C extensions, but make their success
     optional.

   - Fix a ‘DeprecationWarning’ that could come from I and L objects in
     Python 2 in pure-Python mode.  See
     ‘https://github.com/zopefoundation/BTrees/issues/79’

4.8 4.4.1 (2017-01-24)
======================

Fixed a packaging bug that caused extra files to be included (some of
which caused problems in some platforms).

4.9 4.4.0 (2017-01-11)
======================

   - Allow None as a special key (sorted smaller than all others).

     This is a bit of a return to BTrees 3 behavior in that Nones are
     allowed as keys again.  Other objects with default ordering are
     still not allowed as keys.

4.10 4.3.2 (2017-01-05)
=======================

   - Make the CPython implementation consistent with the pure-Python
     implementation and only check object keys for default comparison
     when setting keys.  In Python 2 this makes it possible to remove
     keys that were added using a less restrictive version of BTrees.
     (In Python 3 keys that are unorderable still cannot be removed.)
     Likewise, all versions can unpickle trees that already had such
     keys.  See: ‘https://github.com/zopefoundation/BTrees/issues/53’
     and ‘https://github.com/zopefoundation/BTrees/issues/51’

   - Make the Python implementation consistent with the CPython
     implementation and check object key identity before checking
     equality and performing comparisons.  This can allow fixing trees
     that have keys that now have broken comparison functions.  See
     ‘https://github.com/zopefoundation/BTrees/issues/50’

   - Make the CPython implementation consistent with the pure-Python
     implementation and no longer raise ‘TypeError’ for an object key
     (in object-keyed trees) with default comparison on ‘__getitem__’,
     ‘get’ or ‘in’ operations.  Instead, the results will be a
     ‘KeyError’, the default value, and ‘False’, respectively.
     Previously, CPython raised a ‘TypeError’ in those cases, while the
     Python implementation behaved as specified.

     Likewise, non-integer keys in integer-keyed trees will raise
     ‘KeyError’, return the default and return ‘False’, respectively, in
     both implementations.  Previously, pure-Python raised a ‘KeyError’,
     returned the default, and raised a ‘TypeError’, while CPython
     raised ‘TypeError’ in all three cases.

4.11 4.3.1 (2016-05-16)
=======================

   - Packaging: fix password used to automate wheel creation on Travis.

4.12 4.3.0 (2016-05-10)
=======================

   - Fix unexpected ‘OverflowError’ when passing 64bit values to long
     keys / values on Win64.  See:
     ‘https://github.com/zopefoundation/BTrees/issues/32’

   - When testing ‘PURE_PYTHON’ environments under ‘tox’, avoid
     poisoning the user’s global wheel cache.

   - Ensure that the pure-Python implementation, used on PyPy and when a
     C compiler isn’t available for CPython, pickles identically to the
     C version.  Unpickling will choose the best available
     implementation.  This change prevents interoperability problems and
     database corruption if both implementations are in use.  While it
     is no longer possible to pickle a Python implementation and have it
     unpickle to the Python implementation if the C implementation is
     available, existing Python pickles will still unpickle to the
     Python implementation (until pickled again).  See:
     ‘https://github.com/zopefoundation/BTrees/issues/19’

   - Avoid creating invalid objects when unpickling empty BTrees in a
     pure-Python environment.

   - Drop support for Python 2.6 and 3.2.

4.13 4.2.0 (2015-11-13)
=======================

   - Add support for Python 3.5.

4.14 4.1.4 (2015-06-02)
=======================

   - Ensure that pure-Python Bucket and Set objects have a human
     readable ‘__repr__’ like the C versions.

4.15 4.1.3 (2015-05-19)
=======================

   - Fix ‘_p_changed’ when removing items from small pure-Python
     BTrees/TreeSets and when adding items to small pure-Python Sets.
     See: ‘https://github.com/zopefoundation/BTrees/issues/13’

4.16 4.1.2 (2015-04-07)
=======================

   - Suppress testing 64-bit values in OLBTrees on 32 bit machines.
     See: ‘https://github.com/zopefoundation/BTrees/issues/9’

   - Fix ‘_p_changed’ when adding items to small pure-Python
     BTrees/TreeSets.  See:
     ‘https://github.com/zopefoundation/BTrees/issues/11’

4.17 4.1.1 (2014-12-27)
=======================

   - Accomodate long values in pure-Python OLBTrees.

4.18 4.1.0 (2014-12-26)
=======================

   - Add support for PyPy and PyPy3.

   - Add support for Python 3.4.

   - BTree subclasses can define ‘max_leaf_size’ or ‘max_internal_size’
     to control maximum sizes for Bucket/Set and BTree/TreeSet nodes.

   - Detect integer overflow on 32-bit machines correctly under Python
     3.

   - Update pure-Python and C trees / sets to accept explicit None to
     indicate max / min value for ‘minKey’, ‘maxKey’.  (PR #3)

   - Update pure-Python trees / sets to accept explicit None to indicate
     open ranges for ‘keys’, ‘values’, ‘items’.  (PR #3)

4.19 4.0.8 (2013-05-25)
=======================

   - Fix value-based comparison for objects under Py3k: addresses
     invalid merges of ‘[OLI]OBTrees/OBuckets’.

   - Ensure that pure-Python implementation of ‘OOBTree.byValue’ matches
     semantics (reversed-sort) of C implementation.

4.20 4.0.7 (2013-05-22)
=======================

   - Issue #2: compilation error on 32-bit mode of OS/X.

   - Test ‘PURE_PYTHON’ environment variable support: if set, the C
     extensions will not be built, imported, or tested.

4.21 4.0.6 (2013-05-14)
=======================

   - Changed the ‘ZODB’ extra to require only the real ‘ZODB’ package,
     rather than the ‘ZODB3’ metapackage: depending on the version used,
     the metapackage could pull in stale versions of `this' package and
     ‘persistent’.

   - Fixed Python version check in ‘setup.py’.

4.22 4.0.5 (2013-01-15)
=======================

   - Fit the ‘repr’ of bucket objects, which could contain garbage
     characters.

4.23 4.0.4 (2013-01-12)
=======================

   - Emulate the (private) iterators used by the C extension modules
     from pure Python.  This change is “cosmetic” only: it prevents the
     ZCML ‘zope.app.security:permission.zcml’ from failing.  The
     emulated classes are `not' functional, and should be considered
     implementation details.

   - Accomodate buildout to the fact that we no longer bundle a copy of
     ‘persistent.h’.

   - Fix test failures on Windows: no longer rely on overflows from
     ‘sys.maxint’.

4.24 4.0.3 (2013-01-04)
=======================

   - Added ‘setup_requires==['persistent']’.

4.25 4.0.2 (2013-01-03)
=======================

   - Updated Trove classifiers.

   - Added explicit support for Python 3.2, Python 3.3, and PyPy.  Note
     that the C extensions are not (yet) available on PyPy.

   - Python reference implementations now tested separately from the C
     verions on all platforms.

   - 100% unit test coverage.

4.26 4.0.1 (2012-10-21)
=======================

   - Provide local fallback for persistent C header inclusion if the
     persistent distribution isn’t installed.  This makes the winbot
     happy.

4.27 4.0.0 (2012-10-20)
=======================

4.27.1 Platform Changes
-----------------------

   - Dropped support for Python < 2.6.

   - Factored ‘BTrees’ as a separate distribution.

4.27.2 Testing Changes
----------------------

   - All covered platforms tested under ‘tox’.

   - Added support for continuous integration using ‘tox’ and ‘jenkins’.

   - Added ‘setup.py dev’ alias (installs ‘nose’ and ‘coverage’).

   - Dropped dependency on ‘zope.testing’ / ‘zope.testrunner’: tests now
     run with ‘setup.py test’.

4.27.3 Documentation Changes
----------------------------

   - Added API reference, generated via Spinx’ autodoc.

   - Added Sphinx documentation based on ZODB Guide (snippets are
     exercised via ‘tox’).

   - Added ‘setup.py docs’ alias (installs ‘Sphinx’ and
     ‘repoze.sphinx.autointerface’).

Indices and tables
******************

   * genindex

   * modindex

   * search