XML pickle
Stefan Behnel
stefan_ml at behnel.de
Thu Feb 14 01:45:55 EST 2008
Hi,
castironpi at gmail.com wrote:
> Readability of the Pickle module. Can one export to XML, from cost of
> speed and size, to benefit of user-readability?
Regarding pickling to XML, lxml.objectify can do that:
http://codespeak.net/lxml/objectify.html
however:
> It does something else: plus functions do not export their code,
> either in interpreter instructions, or source, or anything else; and
> classes do not export their dictionaries, just their names. But it
> does export in ASCII.
>
> Pickle checks any __safe_for_unpickling__ and __setstate__ methods,
> which enable a little encapsulating, but don't go far.
I'm having a hard time to understand what you are trying to achieve. Could you
state that in a few words? That's usually better than asking for a way to do X
with Y. Y (i.e. pickling in this case) might not be the right solution for you.
Stefan
More information about the Python-list
mailing list