commit | 177e41a1178e501887d24610c0c3feba2cf7f70c | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Thu Jan 30 22:06:23 2003 +0000 |
committer | Guido van Rossum <guido@python.org> | Thu Jan 30 22:06:23 2003 +0000 |
tree | 0be6007ce83caada8d793c2eefaeb53821541ae6 | |
parent | e14295cf5f5a21dd94a540341202deec9e58b4c9 [diff] |
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.