eval(repr(x)) == x

Courageous jkraska at san.rr.com
Tue Jan 29 11:50:03 EST 2002


>I don't think Unify (for that was the name of my lang) serialisation files
>would be particularly time-consuming to read in, because structurally they
>were rather simple, a bit like Lisp, or Python lists and dictionaries.

I've done something like that for Java. It was done in plain text,
to be human readable. Of course, if human readability isn't a design
goal, serializing it in some other format would be much better. Further,
if you have _many_ objects with repeated values (e.g., "i", "j", "x", and
so forth), it might pay to use a look-aside symbol table. The probability
of getting a symbol table payoff goes up significantly if you serialize
multiple objects in some common directory with a shared symbol table.

C//




More information about the Python-list mailing list