summaryrefslogtreecommitdiff
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-01-30 05:39:04 +0000
committerGuido van Rossum <guido@python.org>2003-01-30 05:39:04 +0000
commit45486176ea14884400188c604d5d3488f803ff2d (patch)
tree1d1015f4e7e6ea85999653e054404a8d39399852 /Python/modsupport.c
parent301eb71fb9fe45eabdf50763a28925c746403100 (diff)
downloadcpython-git-45486176ea14884400188c604d5d3488f803ff2d.tar.gz
In save_newobj(), if an object's __getnewargs__ and __getstate__ are
the same function, don't save the state or write a BUILD opcode. This is so that a type (e.g. datetime :-) can support protocol 2 using __getnewargs__ while also supporting protocol 0 and 1 using __getstate__. (Without this, the state would be pickled twice with protocol 2, unless __getstate__ is defined to return None, which breaks protocol 0 and 1.)
Diffstat (limited to 'Python/modsupport.c')
0 files changed, 0 insertions, 0 deletions