Python wrapper for C++ STL?

D-Man dsh8290 at rit.edu
Sat Dec 9 01:21:39 EST 2000


Python already has it :

dict = { } # make up a dictionary
keys = dict.keys()  # get the keys
keys.sort() # sort the keys , too bad this returns None, it would be useful as
an expression

for key in keys :
	print dict[ key ]


:-)
-D

On Fri, 08 Dec 2000 22:00:44 Edward C. Jones wrote:
 | shindich at my-deja.com wrote:
 | 
 | > With all due respect, what would be wrong with a definition like
 | > std::map<PyObject*, PyObject*>? Obviously there is no type safety here.
 | > But Python is not type safe.
 | 
 | This seems correct. It would give me a "sorted associative container", a
 | dictionary I could loop through.
 | 
 | Ed Jones
 | 
 | 
 | -- 
 | http://www.python.org/mailman/listinfo/python-list
 | 





More information about the Python-list mailing list