On Mar 1, 2007, at 9:04 AM, Chris Withers wrote:

Hi All,

Wondering if someone could tell me the difference between an OOSet and an OOTreeSet?

They seem to have different interfaces and yet seem to be used in similar circumstances in PluginIndexes/common/UnIndex.py...

I'm looking for a set-like data structure which will likely get pretty large over time and so I don't want the whole data structure written to disk each time I add a new item to the set.

What should I be using?

TreeSet.

FWIW, here's an excerpt from the ZODB trunk BTrees/Interface.py

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

    BTree = Attribute(
        """The IBTree for this module.

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

    Bucket = Attribute(
        """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.""")

    TreeSet = Attribute(
        """The ITreeSet for this module.

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

    Set = Attribute(
"""The ISet for this module: the leaf-node data buckets used by the
        TreeSet.

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

Gary
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to