seqdict 0.0 - 2 sequential dictionary emulations

Wolfgang Grafen
Tue, 27 Jul 99 15:27:20 GMT


Package seqdict
Module seqdict version 0.0
Module mseqdict version 0.0 

seqdict - single value dictionary 
msedict - multiple value dictionary 

The Python built-in dictionary has no reliable sequence order because
of performance reasons. 

The two new dictionaries introduced here keep their entries in sequence. 

* seqdict keeps one value for one key 
* mseqdict keeps multiple values per key and is the closest emulation 
  of areal world dictionary. 

As the sequential dictionary is a combination of a list and a dictionary
you can do most operations defined with lists as well and much more. 

Now you can slice, add, sort with dictionaries. The functional operations
map, filter, reduce are implemented as well. Use a dictionary like a stack
with push and pop. Split it, reverse it and swap keys and values.

A small tutorial is provided as HTML and Postscript Source and is
subject to become improved some other day. 

I think both dictionaries are candidates for the python standard

Use the seqdicts to emulate a printed dictionary. Use them for
Keep parsed code in a seqdict, modify it and write it back ... 

Download from,366919/Python/Modules/Modules.html

Wolfgang Grafen

For the web thingy:
<P><A HREF=",366919/Python/Modules/Modules.html">seqdict
0.0</A> - package with two sequential dictionary emulations.  (26-Jul-99)

Wolfgang Grafen

----------- comp.lang.python.announce (moderated) ----------
Article Submission Address:
Python Language Home Page:
Python Quick Help Index: