Staging
v0.5.1
v0.5.1
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
File | Mode | Size |
---|---|---|
_.c | -rw-r--r-- | 0 bytes |
pyth_w31.mak | -rw-r--r-- | 7.2 KB |
pyth_w31.pdb | -rw-r--r-- | 4.7 KB |
pyth_w31.vcw | -rw-r--r-- | 90 bytes |
pyth_w31.wsp | -rw-r--r-- | 254 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...