Dictionary class in C++

Larry Whitley ldw at us.ibm.com
Fri Jun 23 10:24:26 EDT 2000


I am writing a python program to process some traces in preparation for
running the traces through a model written in C++.  Python's dictionary
class seems to give me what I'm looking for on the python side of the
equation and I am trying to translate the dictionary to C++ constructs.

Looking through the IBM Open Class library (I haven't upgraded my compiler
to one that can do STL yet) I find a number of "collection classes".  The
first level of organization is into Flat Collection Classes or Trees.  Of
the two Flat seems to be right.  The next level of organization is a table
too complicated to reproduce here.  The net is that it looks to me like the
Dictionary is: Unordered and Keyed.   Given that the corresponding
collection class is one of four posibilities depending on the element and
key characteritics:

Element equality and element uniqueness = Map
Element equality and no element unizueness = Relationship.
No Element equality and element uniqueness = Key Set.
No Element equality and no element uniqueness = Key Bag.

Can anyone help me sort the above out - which is the python dictionary?

Larry





More information about the Python-list mailing list