[Python-Dev] collections module

Dmitry Vasiliev lists at hlabs.spb.ru
Fri Jan 9 11:26:56 EST 2004

Raymond Hettinger wrote:
> I would like to establish a new module for some collection classes.


> The first type would be a bag, modeled after one of Smalltalk's
> key collection classes (similar to MultiSets in C++ and bags in
> Objective C).
> The second type would be a high speed queue implemented using
> linked list blocks like we used for itertools.tee().  The 
> interface could be as simple as push, pop, and len.  Each
> operation ought to run about as fast a list assignment (meaning
> that it beats the heck out of the list.pop(0), list.append(data)
> version).

In some of my projects I'd really needed sorted dict. (dict sorted by 
value and indexed by key or index)

> This module could also serve as the "one obvious place to put it"
> for other high performance datatypes that might be added in the
> future (such as fibheaps or some such).

Maybe set and frozenset are need to be in this module too?

Dmitry Vasiliev (dima at hlabs.spb.ru)

More information about the Python-Dev mailing list