API Reference

Protocol APIs

interface BTrees.Interfaces.ICollection[source]
clear()

Remove all of the items from the collection.

__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[source]
__getitem__(index)

Return the value at the given index.

An IndexError is raised if the index cannot be found.

__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[source]

Extends: BTrees.Interfaces.ICollection

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.

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.

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.

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[source]

Extends: BTrees.Interfaces.IKeyed

insert(key)

Add the key (value) to the set.

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

update(seq)

Add the items from the given sequence to the set.

remove(key)

Remove the key from the set.

Raises KeyError if key is not in the set.

interface BTrees.Interfaces.ISized[source]

An object that supports __len__.

__len__()

Return the number of items in the container.

interface BTrees.Interfaces.IKeySequence[source]

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

__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[source]

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

__delitem__(key)

Delete the value associated with the given key.

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

__getitem__(key)

Get the value associated with the given key.

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

get(key, default)

Get the value associated with the given key.

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

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.

__setitem__(key, value)

Set the value associated with the given key.

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.

interface BTrees.Interfaces.IDictionaryIsh[source]

Extends: BTrees.Interfaces.IMinimalDictionary

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.

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.

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 is raised.

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(), 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).

interface BTrees.Interfaces.IMerge[source]

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 number protocols methods __and__, __or__ and __sub__ are provided by all the data structures. They are shortcuts for intersection(), union() and difference().

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.

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.

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.

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.

interface BTrees.Interfaces.IIMerge[source]

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.

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.

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.

interface BTrees.Interfaces.IMergeIntegerKey[source]

Extends: BTrees.Interfaces.IMerge

IMerge-able objects with integer keys.

Concretely, this means the types in IOBTree and IIBTree.

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:

The union is returned as a Set from the same module (for example, 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.

BTree Family APIs

interface BTrees.Interfaces.ISet[source]

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

__and__(other)

Shortcut for intersection()

__sub__(other)

Shortcut for :meth:`~BTrees.Interfaces.IMerge.difference

__or__(other)

Shortcut for union()

interface BTrees.Interfaces.ITreeSet[source]

Extends: BTrees.Interfaces.ISetMutable

__and__(other)

Shortcut for intersection()

__sub__(other)

Shortcut for :meth:`~BTrees.Interfaces.IMerge.difference

__or__(other)

Shortcut for union()

interface BTrees.Interfaces.IBTree[source]

Extends: BTrees.Interfaces.IDictionaryIsh

__and__(other)

Shortcut for intersection()

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()
__or__(other)

Shortcut for union()

__sub__(other)

Shortcut for difference()

interface BTrees.Interfaces.IBTreeFamily[source]

the 64-bit or 32-bit family

OO

The IObjectObjectBTreeModule for this family

OI

The IObjectIntegerBTreeModule for this family

maxuint

The maximum unsigned integer storable in this family

UU

The IUnsignedUnsignedBTreeModule for this family

IU

The IIntegerUnsignedBTreeModule for this family

II

The IIntegerIntegerBTreeModule for this family

minint

The minimum signed integer storable in this family

UO

The IUnsignedObjectBTreeModule for this family

maxint

The maximum signed integer storable in this family

UI

The IUnsignedIntegerBTreeModule for this family

IO

The IIntegerObjectBTreeModule for this family

OU

The IObjectUnsignedBTreeModule for this family

UF

The IUnsignedFloatBTreeModule for this family

IF

The IIntegerFloatBTreeModule for this family

There are two families defined:

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.

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.

Module APIs

interface BTrees.Interfaces.IBTreeModule[source]

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

Set

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

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

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.

BTree

The IBTree for this module.

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

TreeSet

The ITreeSet for this module.

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

interface BTrees.Interfaces.IObjectObjectBTreeModule[source]

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[source]

Extends: BTrees.Interfaces._IMergeBTreeModule

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

describes IOBTree and LOBTree

interface BTrees.Interfaces.IObjectIntegerBTreeModule[source]

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[source]

Extends: BTrees.Interfaces._IMergeBTreeModule, BTrees.Interfaces.IMergeIntegerKey

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

describes IIBTree and LLBTree

interface BTrees.Interfaces.IIntegerFloatBTreeModule[source]

Extends: BTrees.Interfaces._IMergeBTreeModule

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

describes IFBTree and LFBTree

Utilities

class BTrees.Length.Length(v=0)[source]

Bases: persistent.Persistent

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.

__call__(*args)[source]

Return the current length value.

__getstate__()[source]

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.

__init__(v=0)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

__setstate__(v)[source]

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.

change(delta)[source]

Add delta to the length value.

set(v)[source]

Set the length value to v.

__dict__ = dict_proxy({'__module__': 'BTrees.Length', 'set': <function set>, '__setstate__': <function __setstate__>, '_p_resolveConflict': <function _p_resolveConflict>, 'value': 0, '__dict__': <attribute '__dict__' of 'Length' objects>, '__init__': <function __init__>, '__call__': <function __call__>, '__getstate__': <function __getstate__>, '__weakref__': <attribute '__weakref__' of 'Length' objects>, '__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 ', 'change': <function change>})
__module__ = 'BTrees.Length'
__weakref__

list of weak references to the object (if defined)

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)[source]

Bases: BTrees.check.Walker

__init__(obj)[source]
check()[source]
check_sorted(obj, path, keys, lo, hi)[source]
complain(msg, obj, path)[source]
visit_btree(obj, path, parent, is_mapping, keys, kids, lo, hi)[source]
visit_bucket(obj, path, parent, is_mapping, keys, values, lo, hi)[source]
__module__ = 'BTrees.check'
class BTrees.check.Printer(obj)[source]

Bases: BTrees.check.Walker

__init__(obj)[source]
display()[source]
visit_btree(obj, path, parent, is_mapping, keys, kids, lo, hi)[source]
visit_bucket(obj, path, parent, is_mapping, keys, values, lo, hi)[source]
__module__ = 'BTrees.check'
class BTrees.check.Walker(obj)[source]
__init__(obj)[source]
visit_btree(obj, path, parent, is_mapping, keys, kids, lo, hi)[source]
visit_bucket(obj, path, parent, is_mapping, keys, values, lo, hi)[source]
walk()[source]
__module__ = 'BTrees.check'
BTrees.check.check(btree)[source]

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 if anything is wrong, with a string detail explaining the problems. The entire tree is checked before AssertionError is raised, and the string detail may be large (depending on how much went wrong).

BTrees.check.classify(obj)[source]
BTrees.check.crack_btree(t, is_mapping)[source]
BTrees.check.crack_bucket(b, is_mapping)[source]
BTrees.check.display(btree)[source]

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

BTrees.check.type_and_adr(obj)[source]

BTree Data Structure Variants

Integer Keys

Float Values

BTrees.IFBTree.Bucket

alias of BTrees.IFBTree.IFBucket

BTrees.IFBTree.Set

alias of BTrees.IFBTree.IFSet

BTrees.IFBTree.BTree

alias of BTrees.IFBTree.IFBTree

BTrees.IFBTree.TreeSet

alias of BTrees.IFBTree.IFTreeSet

class BTrees.IFBTree.IFBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.IFBTree.IFSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.IFBTree.IFBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.IFBTree.IFTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.IFBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.IFBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.IFBTree.difference(o1, o2)

compute the difference between o1 and o2

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

compute the union of o1 and o2

w1 and w2 are weights.

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

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Integer Values

BTrees.IIBTree.Bucket

alias of BTrees.IIBTree.IIBucket

BTrees.IIBTree.Set

alias of BTrees.IIBTree.IISet

BTrees.IIBTree.BTree

alias of BTrees.IIBTree.IIBTree

BTrees.IIBTree.TreeSet

alias of BTrees.IIBTree.IITreeSet

class BTrees.IIBTree.IIBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.IIBTree.IISet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.IIBTree.IIBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.IIBTree.IITreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.IIBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.IIBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.IIBTree.difference(o1, o2)

compute the difference between o1 and o2

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

compute the union of o1 and o2

w1 and w2 are weights.

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

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Object Values

BTrees.IOBTree.Bucket

alias of BTrees.IOBTree.IOBucket

BTrees.IOBTree.Set

alias of BTrees.IOBTree.IOSet

BTrees.IOBTree.BTree

alias of BTrees.IOBTree.IOBTree

BTrees.IOBTree.TreeSet

alias of BTrees.IOBTree.IOTreeSet

class BTrees.IOBTree.IOBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.IOBTree.IOSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.IOBTree.IOBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.IOBTree.IOTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.IOBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.IOBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.IOBTree.difference(o1, o2)

compute the difference between o1 and o2

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.

Unsigned Integer Values

BTrees.IUBTree.Bucket

alias of BTrees.IUBTree.IUBucket

BTrees.IUBTree.Set

alias of BTrees.IUBTree.IUSet

BTrees.IUBTree.BTree

alias of BTrees.IUBTree.IUBTree

BTrees.IUBTree.TreeSet

alias of BTrees.IUBTree.IUTreeSet

class BTrees.IUBTree.IUBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.IUBTree.IUSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.IUBTree.IUBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.IUBTree.IUTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.IUBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.IUBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.IUBTree.difference(o1, o2)

compute the difference between o1 and o2

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

compute the union of o1 and o2

w1 and w2 are weights.

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

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Long Integer Keys

Float Values

BTrees.LFBTree.Bucket

alias of BTrees.LFBTree.LFBucket

BTrees.LFBTree.Set

alias of BTrees.LFBTree.LFSet

BTrees.LFBTree.BTree

alias of BTrees.LFBTree.LFBTree

BTrees.LFBTree.TreeSet

alias of BTrees.LFBTree.LFTreeSet

class BTrees.LFBTree.LFBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.LFBTree.LFSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.LFBTree.LFBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.LFBTree.LFTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.LFBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.LFBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.LFBTree.difference(o1, o2)

compute the difference between o1 and o2

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

compute the union of o1 and o2

w1 and w2 are weights.

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

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Long Integer Values

BTrees.LLBTree.Bucket

alias of BTrees.LLBTree.LLBucket

BTrees.LLBTree.Set

alias of BTrees.LLBTree.LLSet

BTrees.LLBTree.BTree

alias of BTrees.LLBTree.LLBTree

BTrees.LLBTree.TreeSet

alias of BTrees.LLBTree.LLTreeSet

class BTrees.LLBTree.LLBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.LLBTree.LLSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.LLBTree.LLBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.LLBTree.LLTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.LLBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.LLBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.LLBTree.difference(o1, o2)

compute the difference between o1 and o2

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

compute the union of o1 and o2

w1 and w2 are weights.

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

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Object Values

BTrees.LOBTree.Bucket

alias of BTrees.LOBTree.LOBucket

BTrees.LOBTree.Set

alias of BTrees.LOBTree.LOSet

BTrees.LOBTree.BTree

alias of BTrees.LOBTree.LOBTree

BTrees.LOBTree.TreeSet

alias of BTrees.LOBTree.LOTreeSet

class BTrees.LOBTree.LOBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.LOBTree.LOSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.LOBTree.LOBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.LOBTree.LOTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.LOBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.LOBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.LOBTree.difference(o1, o2)

compute the difference between o1 and o2

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.

Quad Unsigned Integer Values

BTrees.LQBTree.Bucket

alias of BTrees.LQBTree.LQBucket

BTrees.LQBTree.Set

alias of BTrees.LQBTree.LQSet

BTrees.LQBTree.BTree

alias of BTrees.LQBTree.LQBTree

BTrees.LQBTree.TreeSet

alias of BTrees.LQBTree.LQTreeSet

class BTrees.LQBTree.LQBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.LQBTree.LQSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.LQBTree.LQBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.LQBTree.LQTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.LQBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.LQBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.LQBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.LQBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.LQBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Object Keys

Integer Values

BTrees.OIBTree.Bucket

alias of BTrees.OIBTree.OIBucket

BTrees.OIBTree.Set

alias of BTrees.OIBTree.OISet

BTrees.OIBTree.BTree

alias of BTrees.OIBTree.OIBTree

BTrees.OIBTree.TreeSet

alias of BTrees.OIBTree.OITreeSet

class BTrees.OIBTree.OIBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OIBTree.OISet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.OIBTree.OIBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OIBTree.OITreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.OIBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.OIBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.OIBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.OIBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.OIBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

Long Integer Values

BTrees.OLBTree.Bucket

alias of BTrees.OLBTree.OLBucket

BTrees.OLBTree.Set

alias of BTrees.OLBTree.OLSet

BTrees.OLBTree.BTree

alias of BTrees.OLBTree.OLBTree

BTrees.OLBTree.TreeSet

alias of BTrees.OLBTree.OLTreeSet

class BTrees.OLBTree.OLBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OLBTree.OLSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.OLBTree.OLBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OLBTree.OLTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.OLBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.OLBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.OLBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.OLBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.OLBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

Object Values

BTrees.OOBTree.Bucket

alias of BTrees.OOBTree.OOBucket

BTrees.OOBTree.Set

alias of BTrees.OOBTree.OOSet

BTrees.OOBTree.BTree

alias of BTrees.OOBTree.OOBTree

BTrees.OOBTree.TreeSet

alias of BTrees.OOBTree.OOTreeSet

class BTrees.OOBTree.OOBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OOBTree.OOSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.OOBTree.OOBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OOBTree.OOTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.OOBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.OOBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.OOBTree.difference(o1, o2)

compute the difference between o1 and o2

Quad Unsigned Integer Values

BTrees.OQBTree.Bucket

alias of BTrees.OQBTree.OQBucket

BTrees.OQBTree.Set

alias of BTrees.OQBTree.OQSet

BTrees.OQBTree.BTree

alias of BTrees.OQBTree.OQBTree

BTrees.OQBTree.TreeSet

alias of BTrees.OQBTree.OQTreeSet

class BTrees.OQBTree.OQBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OQBTree.OQSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.OQBTree.OQBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OQBTree.OQTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.OQBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.OQBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.OQBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.OQBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.OQBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

Unsigned Integer Values

BTrees.OUBTree.Bucket

alias of BTrees.OUBTree.OUBucket

BTrees.OUBTree.Set

alias of BTrees.OUBTree.OUSet

BTrees.OUBTree.BTree

alias of BTrees.OUBTree.OUBTree

BTrees.OUBTree.TreeSet

alias of BTrees.OUBTree.OUTreeSet

class BTrees.OUBTree.OUBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OUBTree.OUSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.OUBTree.OUBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.OUBTree.OUTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.OUBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.OUBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.OUBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.OUBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.OUBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

Quad Unsigned Integer Keys

Float Values

BTrees.QFBTree.Bucket

alias of BTrees.QFBTree.QFBucket

BTrees.QFBTree.Set

alias of BTrees.QFBTree.QFSet

BTrees.QFBTree.BTree

alias of BTrees.QFBTree.QFBTree

BTrees.QFBTree.TreeSet

alias of BTrees.QFBTree.QFTreeSet

class BTrees.QFBTree.QFBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.QFBTree.QFSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.QFBTree.QFBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.QFBTree.QFTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.QFBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.QFBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.QFBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.QFBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.QFBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Long Integer Values

BTrees.QLBTree.Bucket

alias of BTrees.QLBTree.QLBucket

BTrees.QLBTree.Set

alias of BTrees.QLBTree.QLSet

BTrees.QLBTree.BTree

alias of BTrees.QLBTree.QLBTree

BTrees.QLBTree.TreeSet

alias of BTrees.QLBTree.QLTreeSet

class BTrees.QLBTree.QLBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.QLBTree.QLSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.QLBTree.QLBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.QLBTree.QLTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.QLBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.QLBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.QLBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.QLBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.QLBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Object Values

BTrees.QOBTree.Bucket

alias of BTrees.QOBTree.QOBucket

BTrees.QOBTree.Set

alias of BTrees.QOBTree.QOSet

BTrees.QOBTree.BTree

alias of BTrees.QOBTree.QOBTree

BTrees.QOBTree.TreeSet

alias of BTrees.QOBTree.QOTreeSet

class BTrees.QOBTree.QOBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.QOBTree.QOSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.QOBTree.QOBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.QOBTree.QOTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.QOBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.QOBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.QOBTree.difference(o1, o2)

compute the difference between o1 and o2

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.

Quad Unsigned Integer Values

BTrees.QQBTree.Bucket

alias of BTrees.QQBTree.QQBucket

BTrees.QQBTree.Set

alias of BTrees.QQBTree.QQSet

BTrees.QQBTree.BTree

alias of BTrees.QQBTree.QQBTree

BTrees.QQBTree.TreeSet

alias of BTrees.QQBTree.QQTreeSet

class BTrees.QQBTree.QQBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.QQBTree.QQSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.QQBTree.QQBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.QQBTree.QQTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.QQBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.QQBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.QQBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.QQBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.QQBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Unsigned Integer Keys

Float Values

BTrees.UFBTree.Bucket

alias of BTrees.UFBTree.UFBucket

BTrees.UFBTree.Set

alias of BTrees.UFBTree.UFSet

BTrees.UFBTree.BTree

alias of BTrees.UFBTree.UFBTree

BTrees.UFBTree.TreeSet

alias of BTrees.UFBTree.UFTreeSet

class BTrees.UFBTree.UFBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.UFBTree.UFSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.UFBTree.UFBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.UFBTree.UFTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.UFBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.UFBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.UFBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.UFBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.UFBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Integer Values

BTrees.UIBTree.Bucket

alias of BTrees.UIBTree.UIBucket

BTrees.UIBTree.Set

alias of BTrees.UIBTree.UISet

BTrees.UIBTree.BTree

alias of BTrees.UIBTree.UIBTree

BTrees.UIBTree.TreeSet

alias of BTrees.UIBTree.UITreeSet

class BTrees.UIBTree.UIBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.UIBTree.UISet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.UIBTree.UIBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.UIBTree.UITreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.UIBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.UIBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.UIBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.UIBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.UIBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

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.

Object Values

BTrees.UOBTree.Bucket

alias of BTrees.UOBTree.UOBucket

BTrees.UOBTree.Set

alias of BTrees.UOBTree.UOSet

BTrees.UOBTree.BTree

alias of BTrees.UOBTree.UOBTree

BTrees.UOBTree.TreeSet

alias of BTrees.UOBTree.UOTreeSet

class BTrees.UOBTree.UOBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.UOBTree.UOSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.UOBTree.UOBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.UOBTree.UOTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.UOBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.UOBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.UOBTree.difference(o1, o2)

compute the difference between o1 and o2

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.

Unsigned Integer Values

BTrees.UUBTree.Bucket

alias of BTrees.UUBTree.UUBucket

BTrees.UUBTree.Set

alias of BTrees.UUBTree.UUSet

BTrees.UUBTree.BTree

alias of BTrees.UUBTree.UUBTree

BTrees.UUBTree.TreeSet

alias of BTrees.UUBTree.UUTreeSet

class BTrees.UUBTree.UUBucket

Bases: persistent.Persistent

__getstate__()

__getstate__() – Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

__setstate__() – Set the state of the object

byValue()

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

clear()

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

get()

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

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

has_key()

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

items()

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

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
keys()

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

maxKey()

maxKey([key]) – Find the maximum key

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

minKey()

minKey([key]) – Find the minimum key

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

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.

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.

update()

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

values()

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

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.UUBTree.UUSet

Bases: persistent.Persistent

__getstate__()

Return the picklable state of the object

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__()

Set the state of the object

add(id)

Add a key to the set

clear()

Remove all of the items from the bucket

has_key(key)

Test whether the bucket contains the given key

insert(id)

Add a key to the set

keys()

Return the keys

maxKey([key])

Find the maximum key

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

minKey([key])

Find the minimum key

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

remove(id)

Remove an id from the set

update(seq)

Add the items from the given sequence to the set

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__repr__
__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

class BTrees.UUBTree.UUBTree

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the BTree.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the BTree.

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.

clear()

Remove all of the items from the BTree.

get(key[, default=None]) → Value for key or default

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

has_key(key)

Return true if the BTree contains the given key.

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.

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.

iteritems([min[, max]]) → an iterator over the (key, value) items of B
iterkeys([min[, max]]) → an iterator over the keys of B
itervalues([min[, max]]) → an iterator over the values of B
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.

maxKey([max]) → key

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

minKey([mi]) → key

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

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.

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.

update(collection)

Add the items from the given collection.

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.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__delitem__

x.__delitem__(y) <==> del x[y]

__getitem__

x.__getitem__(y) <==> x[y]

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__setitem__

x.__setitem__(i, y) <==> x[i]=y

__sub__

x.__sub__(y) <==> x-y

class BTrees.UUBTree.UUTreeSet

Bases: persistent.Persistent

__getstate__() → state

Return the picklable state of the TreeSet.

__new__(S, ...) → a new object with type S, a subtype of T
__setstate__(state)

Set the state of the TreeSet.

add()

add(id) – Add an item to the set

clear()

Remove all of the items from the BTree.

has_key(key)

Return true if the TreeSet contains the given key.

insert()

insert(id) – Add an item to the set

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.

maxKey([max]) → key

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

minKey([mi]) → key

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

remove()

remove(id) – Remove a key from the set

update(collection)

Add the items from the given collection.

__and__

x.__and__(y) <==> x&y

__contains__

x.__contains__(y) <==> y in x

__init__

x.__init__(…) initializes x; see help(type(x)) for signature

__iter__
__len__
__nonzero__

x.__nonzero__() <==> x != 0

__or__

x.__or__(y) <==> x|y

__rand__

x.__rand__(y) <==> y&x

__ror__

x.__ror__(y) <==> y|x

__rsub__

x.__rsub__(y) <==> y-x

__sub__

x.__sub__(y) <==> x-y

BTrees.UUBTree.union(o1, o2)

compute the union of o1 and o2

BTrees.UUBTree.intersection(o1, o2)

compute the intersection of o1 and o2

BTrees.UUBTree.difference(o1, o2)

compute the difference between o1 and o2

BTrees.UUBTree.weightedUnion(o1, o2[, w1, w2])

compute the union of o1 and o2

w1 and w2 are weights.

BTrees.UUBTree.weightedIntersection(o1, o2[, w1, w2])

compute the intersection of o1 and o2

w1 and w2 are weights.

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.