Staging
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
Raw File
.hgtags
17eff686be30de0869e6429dc899ebd5d11bfcfe v0.9.8
528bb189d30311d2cea71ffae3e1940e1f17097d v0.9.9
20f984c32c71fc7269e0da860f76ba0a36eefce5 v1.0.1
c2bc4e060320b62a541599d4e60b624a2a583c55 v1.0.2
0a445ebc9a917d5b3fbd6f62e49cc4f3056b4d9c v1.1
df3bafb2d3fa64ef00d8357101477ea9721cb66a v1.1.1
9d47346c7e1d544db4cd96712cbc3aa656dc48dc v1.2b1
366e7871dc1cc5c6b75750eb3d7dbd3e83913533 v1.2b2
e39e29c31050e38e8abf2af4ef9e8e4518c8ce3c v1.2b3
1efa7bc3bb11bfb4d6318407b0ecebc238874f36 v1.2b4
1f07c2d5483fc78a873a63217a4671f2b6b5a5e8 v1.2
5e17909fb6c8155c074a0cef66768746be08de41 v1.3b1
290c807bff1c8e6b888fca28c9d0f77e48911b37 v1.3
7ec5fea9cc70dd94276c11dbdca9814dd5a37042 v1.4b1
6993ce4906d383955d04af5933d219a132012ec1 v1.4b2
b3d40b261ddbd2d86b1eaf7c4b3f4d60fdbf25f4 v1.4b3
9b3b8b854609b679520aab52aaf221a9c549cdf4 v1.4
00f0e3c2b34ec3e518525f99dae537d3e1c5f3c8 v1.5a1
fb128ab641015e92cc0c227a2e3be3ae71aba00d v1.5a2
000b1d4c1aa011c2d407900bce7b829eedcb745a v1.5a3
31286d460c6ce43fc86771da2fc32eec668c0a72 v1.5a4
798e142331dfe161335f0649ed923bfdd9730e47 v1.5b1
back to top