[issue19219] speed up marshal.loads()

Antoine Pitrou report at bugs.python.org
Fri Oct 11 14:13:53 CEST 2013


Antoine Pitrou added the comment:

> In fact, using 'marshal' as a cheap and fast pickler for builtin types
> is actually a good idea because it has no side effects like invoking
> code.

It's an unsupported use case. The marshal docs are quite clear:

"""Therefore, the Python maintainers reserve the right to modify
the marshal format in backward incompatible ways should the need
arise. If you’re serializing and de-serializing Python objects,
use the pickle module instead [...]"""

So, it's a "good idea" as long as you're willing to deal with the
consequences :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19219>
_______________________________________


More information about the Python-bugs-list mailing list