[Python-Dev] collections module

Skip Montanaro skip at pobox.com
Fri Jan 9 10:20:16 EST 2004

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

    Raymond> The first type would be a bag, modeled after one of Smalltalk's
    Raymond> key collection classes (similar to MultiSets in C++ and bags in
    Raymond> Objective C).

I'm neither a Smalltalk, C++ or Objective C programmer.  How is a bag
different from a set?  In my GE days (pre-Python) we had a collection class
in a proprietary language which was used as a proxy.  You'd send a message
to the collection and it would forward it to all the elements it contained.
This was rather convenient.  You could tell all the actors to turn and face
the camera, for example.

Oddly enough, although we used collections heavily, I never really missed
that functionality in Python.  I implemented it once or twice, but never
used it much.  Different style of programming I guess.


More information about the Python-Dev mailing list