]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Change the approach to pickling to use __reduce__ everywhere. Most
authorGuido van Rossum <guido@python.org>
Thu, 30 Jan 2003 22:06:23 +0000 (22:06 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 30 Jan 2003 22:06:23 +0000 (22:06 +0000)
commit177e41a1178e501887d24610c0c3feba2cf7f70c
tree0be6007ce83caada8d793c2eefaeb53821541ae6
parente14295cf5f5a21dd94a540341202deec9e58b4c9
Change the approach to pickling to use __reduce__ everywhere.  Most
classes have a __reduce__ that returns (self.__class__,
self.__getstate__()).  tzinfo.__reduce__() is a bit smarter, calling
__getinitargs__ and __getstate__ if they exist, and falling back to
__dict__ if it exists and isn't empty.
Lib/test/test_datetime.py
Modules/datetimemodule.c