Next: , Up: Utilities


8.3.1 buildbot.util.bbcollections

This package provides a few useful collection objects. Note that it used to be named collections, but without absolute imports (PEP 328), this precluded using the standard library's collections module.

For compatibility, it provides a clone of the Python bbcollections.defaultdict for use in Python-2.4. In later versions, this is simply a reference to the built-in defaultdict, so buildbot code can simply use buildbot.util.collections.defaultdict everywhere.

It also provides a KeyedSets class that can represent any numbers of sets, keyed by name (or anything hashable, really). The object is specially tuned to contain many different keys over its lifetime without wasting memory. See the docstring for more information.