From f156a44e8c5d0184c5868b7d6225d7a497e9ca56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lemburg?= Date: Thu, 7 Sep 2000 11:00:03 +0000 Subject: [PATCH] Added Unicode objects to the copy mechanism. Since these are immutable, they are copied as atomic types. --- Lib/copy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/copy.py b/Lib/copy.py index 100ea13a6a3..9576575e208 100644 --- a/Lib/copy.py +++ b/Lib/copy.py @@ -84,6 +84,7 @@ d[types.IntType] = _copy_atomic d[types.LongType] = _copy_atomic d[types.FloatType] = _copy_atomic d[types.StringType] = _copy_atomic +d[types.UnicodeType] = _copy_atomic try: d[types.CodeType] = _copy_atomic except AttributeError: @@ -160,6 +161,7 @@ d[types.IntType] = _deepcopy_atomic d[types.LongType] = _deepcopy_atomic d[types.FloatType] = _deepcopy_atomic d[types.StringType] = _deepcopy_atomic +d[types.UnicodeType] = _deepcopy_atomic d[types.CodeType] = _deepcopy_atomic d[types.TypeType] = _deepcopy_atomic d[types.XRangeType] = _deepcopy_atomic