[Tutor] (de)serialization questions

Lee Harr missive at hotmail.com
Fri Oct 1 00:37:58 CEST 2010

> I have data about zip codes, street and city names (and perhaps later also of
> street numbers). I made a dictionary of the form {zipcode: (street, city)}

One dictionary with all of the data?

That does not seem like it will work. What happens when
2 addresses have the same zip code?

> Are there forms of object permanence that do not read all data into memory?

How about a file?

You could write your data one record per line, and then
read it in one line at a time also.

You could also use a csv file, or maybe use a database
like sqlite.


More information about the Tutor mailing list