diff options
-rw-r--r-- | Lib/copy.py | 1 | ||||
-rw-r--r-- | Lib/test/test_copy.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Lib/copy.py b/Lib/copy.py index c1c0ec0..b57fa89 100644 --- a/Lib/copy.py +++ b/Lib/copy.py @@ -220,6 +220,7 @@ except AttributeError: pass d[types.TypeType] = _deepcopy_atomic d[types.XRangeType] = _deepcopy_atomic +d[types.ClassType] = _deepcopy_atomic def _deepcopy_list(x, memo): y = [] diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py index 35ce46a..6a31f75 100644 --- a/Lib/test/test_copy.py +++ b/Lib/test/test_copy.py @@ -239,7 +239,7 @@ class TestCopy(unittest.TestCase): pass tests = [None, 42, 2L**100, 3.14, True, False, 1j, "hello", u"hello\u1234", f.func_code, - NewStyle, xrange(10)] + NewStyle, xrange(10), Classic] for x in tests: self.assert_(copy.deepcopy(x) is x, `x`) |