indexed dictionaries?

David Goodger dgoodger at
Mon Apr 10 06:16:26 CEST 2000

on 2000-04-09 22:30, Michal Wallace (sabren) (sabren at
>  I'm looking for a cross between a dictionary and a list,
> such that keys() always returns keys in the order in which they were
> added, and that instance[0] refers to the first key...
> Anyone got something like this?

I have implemented a list/dictionary hybrid in my SGF Parser Library (class
Node in ). It doesn't do ordered
keys(), but it does do indexing by integer (note that in this library, no
numeric dictionary keys will ever be used). It may give you a few ideas.

Please send me a copy of your final implementation of indexed dictionaries;
I'd be interested to see what you come up with.

David Goodger    dgoodger at    Open-source projects:
 - The Go Tools Project:
 (more to come!)

More information about the Python-list mailing list