Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
Revision d1f4984a9bb2e90d4fc473be1a169917277efa4d authored by Guido van Rossum on 10 December 1997, 23:40:18 UTC, committed by Guido van Rossum on 10 December 1997, 23:40:18 UTC
The attached patch adds the following behavior to the handling of REDUCE codes: - A user-defined type may have a __reduce__ method that returns a string rather than a tuple, in which case the object is saved as a global object with a name given by the string returned by reduce. This was a feature added to cPickle a long time ago. - User-defined types can now support unpickling without executing a constructor. The second value returned from '__reduce__' can now be None, rather than an argument tuple. On unpickling, if the second value returned from '__reduce__' during pickling was None, then rather than calling the first value returned from '__reduce__', directly, the '__basicnew__' method of the first value returned from '__reduce__' is called without arguments. I also got rid of a few of Chris' extra ()s, which he used to make python ifs look like C ifs.
1 parent 79f016a
Tip revision: d1f4984a9bb2e90d4fc473be1a169917277efa4d authored by Guido van Rossum on 10 December 1997, 23:40:18 UTC
Jim Fulton writes:
Jim Fulton writes:
Tip revision: d1f4984
File | Mode | Size |
---|---|---|
Compat | ||
Demo | ||
Include | ||
Lib | ||
MPW | ||
Modules | ||
Python | ||
Resources | ||
Tools | ||
Unsupported | ||
mwerks | ||
scripts | ||
think | ||
HISTORY | -rw-r--r-- | 27.2 KB |
ReadMe | -rw-r--r-- | 6.8 KB |
Relnotes | -rw-r--r-- | 4.4 KB |
Relnotes-source | -rw-r--r-- | 1.7 KB |
errno_unix.h | -rw-r--r-- | 307 bytes |
fopenRF.c | -rw-r--r-- | 5.9 KB |
mkapplet.py | -rw-r--r-- | 5.7 KB |
mwerksglue.c | -rw-r--r-- | 566 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...