__repr__ policy problem: should module be prefixed to output?
Andrew Dalke
dalke at acm.org
Fri Dec 15 10:51:26 EST 2000
Per Kraulis:
>I have received some constructive
>criticism, one issue being save/restore functionality. My plan is to
>define a __repr__ for each type in the module.
>
>However, I have realized that there is a policy problem.
>Should __repr__ add the module name as prefix to the output
>string, or not? Or is there some other solution?
You should take a look at the pickle (and cPickle) modules.
See http://www.python.org/doc/current/lib/module-pickle.html
Andrew Dalke
dalke at acm.org
More information about the Python-list
mailing list