"pickle" vs. f.write()

Terry Reedy tjreedy at udel.edu
Wed Jan 26 16:48:56 EST 2005


For basic builtin objects, repr(ob) generally produces a string that when 
eval()ed will recreate the object.  IE
eval(repr(ob) == ob # sometimes
For writing and reading class instances, pickle is the way to go.

Terry J. Reedy






More information about the Python-list mailing list