[issue19219] speed up marshal.loads()

Kristján Valur Jónsson report at bugs.python.org
Fri Oct 11 16:14:59 CEST 2013


Kristján Valur Jónsson added the comment:

"This will save you two opcodes and perhaps several lines of code. "
Just bear in mind that without other changes, version 4 needs to be backwards compatible with version 3.
I ran into this when developing version 3.  The reason is that while the marshal format includes the version information in its header, it isn't actually verified on loading. IIRC.  You specify the expected format to the function, or something like that.  So, if you don't do this, you get errors when loading previously generated .pyc files.
Of course, we are free to fix that problem as well :)

----------

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


More information about the Python-bugs-list mailing list