]> granicus.if.org Git - python/commit
Changes to copy() and deepcopy() in copy.py to support __reduce__ as a
authorGuido van Rossum <guido@python.org>
Fri, 28 Sep 2001 18:13:29 +0000 (18:13 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 28 Sep 2001 18:13:29 +0000 (18:13 +0000)
commit6cef6d5d62f083ada715da3610ce12147b625ee2
treede5a51234c4e4675698d20abc03bd09c1b1ee0fc
parent19405a4a2a68570cae67501935adea3f375f84bf
Changes to copy() and deepcopy() in copy.py to support __reduce__ as a
fallback for objects that are neither supported by our dispatch table
nor have a __copy__ or __deepcopy__ method.

Changes to _reduce() in copy_reg.py to support reducing objects that
don't have a __dict__ -- copy.copy(complex()) now invokes _reduce().

Add tests for copy.copy() and copy.deepcopy() to test_regrtest.py.
Lib/copy.py
Lib/copy_reg.py
Lib/test/test_descr.py