seqdict 0.0 - 2 sequential dictionary emulations

Wolfgang Grafen wolfgang.grafen@de.bosch.com
Tue, 27 Jul 99 15:27:20 GMT


26.7.1999 

http://www.germany.net/teilnehmer/100,366919/Python/Modules/Modules.html

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
library. 

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

Download from 
http://www.germany.net/teilnehmer/100,366919/Python/Modules/Modules.html

Wolfgang Grafen 
mailto:WolfgangGrafen@gmx.de

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

Wolfgang Grafen 
mailto:WolfgangGrafen@gmx.de

-- 
----------- comp.lang.python.announce (moderated) ----------
Article Submission Address:  python-announce@python.org
Python Language Home Page:   http://www.python.org/
Python Quick Help Index:     http://www.python.org/Help.html
------------------------------------------------------------