Memory Error while constructing Compound Dictionary
Benjamin Scott
mynewjunkaccount at hotmail.com
Tue Sep 7 13:47:22 EDT 2004
Hello.
I attempted to build a compound dictionary:
len(Lst)=1000
len(nuerLst)=250
len(nuestLst)=500
Dict={}
for s in Lst:
Dict[s]={}
for s in Lst:
for t in nuerLst:
Dict[s][t]={}
for s in Lst:
for t in nuerLst:
for r in nuestLst:
Dict[s][t][r]={}
I got the following error:
Traceback (most recent call last):
File "<pyshell#89>", line 5, in -toplevel-
Dict[s][t][r]=[]
MemoryError
Specs:
Python 2.3.4
XPpro
4 GB RAM
Python was utilizing 2.0 GB when the error was generated. I have
attempted this task twice with different data sets. I got the same
error both times.
Thanks in advance for your feedback,
Benjamin Scott
More information about the Python-list
mailing list