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 |
---|---|---|
Makefile.in | -rw-r--r-- | 2.6 KB |
atof.c | -rw-r--r-- | 2.3 KB |
bltinmodule.c | -rw-r--r-- | 45.1 KB |
ceval.c | -rw-r--r-- | 62.8 KB |
compile.c | -rw-r--r-- | 73.7 KB |
dup2.c | -rw-r--r-- | 691 bytes |
errors.c | -rw-r--r-- | 8.5 KB |
fmod.c | -rw-r--r-- | 1.9 KB |
frozen.c | -rw-r--r-- | 2.3 KB |
frozenmain.c | -rw-r--r-- | 2.4 KB |
getargs.c | -rw-r--r-- | 22.7 KB |
getcompiler.c | -rw-r--r-- | 1.8 KB |
getcopyright.c | -rw-r--r-- | 1.6 KB |
getcwd.c | -rw-r--r-- | 2.8 KB |
getmtime.c | -rw-r--r-- | 1.8 KB |
getopt.c | -rw-r--r-- | 2.3 KB |
getplatform.c | -rw-r--r-- | 1.6 KB |
getversion.c | -rw-r--r-- | 1.7 KB |
graminit.c | -rw-r--r-- | 24.1 KB |
hypot.c | -rw-r--r-- | 309 bytes |
import.c | -rw-r--r-- | 42.8 KB |
importdl.c | -rw-r--r-- | 19.7 KB |
importdl.h | -rw-r--r-- | 1.9 KB |
marshal.c | -rw-r--r-- | 14.9 KB |
memmove.c | -rw-r--r-- | 1.9 KB |
modsupport.c | -rw-r--r-- | 10.2 KB |
mystrtoul.c | -rw-r--r-- | 4.4 KB |
pyfpe.c | -rw-r--r-- | 493 bytes |
pystate.c | -rw-r--r-- | 4.8 KB |
pythonmain.c | -rw-r--r-- | 5.8 KB |
pythonrun.c | -rw-r--r-- | 24.8 KB |
sigcheck.c | -rw-r--r-- | 2.0 KB |
strdup.c | -rw-r--r-- | 321 bytes |
strerror.c | -rw-r--r-- | 1.9 KB |
strtod.c | -rw-r--r-- | 5.1 KB |
structmember.c | -rw-r--r-- | 6.5 KB |
sysmodule.c | -rw-r--r-- | 11.3 KB |
thread.c | -rw-r--r-- | 3.5 KB |
thread_cthread.h | -rw-r--r-- | 4.8 KB |
thread_foobar.h | -rw-r--r-- | 3.8 KB |
thread_lwp.h | -rw-r--r-- | 5.1 KB |
thread_nt.h | -rw-r--r-- | 6.8 KB |
thread_os2.h | -rw-r--r-- | 5.1 KB |
thread_pthread.h | -rw-r--r-- | 10.9 KB |
thread_sgi.h | -rw-r--r-- | 13.0 KB |
thread_solaris.h | -rw-r--r-- | 5.6 KB |
traceback.c | -rw-r--r-- | 6.7 KB |
Computing file changes ...