very large dictionary

Gabriel Genellina gagsl-py2 at
Tue Aug 5 11:36:17 CEST 2008

En Mon, 04 Aug 2008 11:02:16 -0300, Simon Strobl <Simon.Strobl at>  

> I created a python file that contained the dictionary. The size of
> this file was 6.8GB. I thought it would be practical not to create the
> dictionary from a text file each time I needed it. I.e. I thought
> loading the .pyc-file should be faster. Yet, Python failed to create
> a .pyc-file

Looks like the marshal format (used to create the .pyc file) can't handle  
sizes so big - and that limitation will stay for a while:
So follow any of the previous suggestions and store your dictionary as  
data, not code.

Gabriel Genellina

More information about the Python-list mailing list