Big dictionary manipulation

Pawel Lewicki lewy0lewy at NOSPAM_poczta.onet.pl
Mon Jun 16 10:46:37 EDT 2003


Hello,
I have a question about the strategy of manipulating of big dictionaries.
I build the tree-type dynamic structure of dictionaries. Something like
dict={k_1:{k_11:[l_11, l_12]}, k_12:[l_21, l_22], k2:...}
Until now I was converting it to the list [k_1, [k_11, [l_11,l_12]]...] to
set and keep the sequence.
The final amount of data sometimes is really big and deep so I guess that
conversion is unnecessary waste of time. Maybe I should just add indexes -
lists of keys to iterate.
My question is if there is any kind of bottleneck in passing that structure?
Is it a reference so no additional memory is consumed?
That data would be passed from Zope product to ZPT page if it has any
meaning.
I hope that my question is clear enough.

Pawel






More information about the Python-list mailing list