• Guido van Rossum's avatar
    There was a subtle big in save_newobj(): it used self.save_global(t) · 9b40e804
    Guido van Rossum yazdı
    on the type instead of self.save(t).  This defeated the purpose of
    NEWOBJ, because it didn't generate a BINGET opcode when t was already
    memoized; but moreover, it would generate multiple BINPUT opcodes for
    the same type!  pickletools.dis() doesn't like this.
    
    How I found this?  I was playing with picklesize.py in the datetime
    sandbox, and noticed that protocol 2 pickles for multiple objects were
    in fact larger than protocol 1 pickles!  That was suspicious, so I
    decided to disassemble one of the pickles.
    
    This really needs a unit test, but I'm exhausted.  I'll be late for
    work as it is. :-(
    9b40e804
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...