From: Marc-André Lemburg Date: Thu, 7 Sep 2000 11:00:03 +0000 (+0000) Subject: Added Unicode objects to the copy mechanism. Since these are immutable, X-Git-Tag: v2.0b2~436 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f156a44e8c5d0184c5868b7d6225d7a497e9ca56;p=python Added Unicode objects to the copy mechanism. Since these are immutable, they are copied as atomic types. --- diff --git a/Lib/copy.py b/Lib/copy.py index 100ea13a6a..9576575e20 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