Add complex to the dispatch tables, to avoid going through the whole

rigmarole of __reduce__.
This commit is contained in:
Guido van Rossum 2001-09-28 18:16:13 +00:00
parent 6cef6d5d62
commit 8b9def3aac

View File

@ -96,6 +96,10 @@ d[types.NoneType] = _copy_atomic
d[types.IntType] = _copy_atomic
d[types.LongType] = _copy_atomic
d[types.FloatType] = _copy_atomic
try:
d[types.ComplexType] = _copy_atomic
except AttributeError:
pass
d[types.StringType] = _copy_atomic
try:
d[types.UnicodeType] = _copy_atomic
@ -184,6 +188,10 @@ d[types.NoneType] = _deepcopy_atomic
d[types.IntType] = _deepcopy_atomic
d[types.LongType] = _deepcopy_atomic
d[types.FloatType] = _deepcopy_atomic
try:
d[types.ComplexType] = _deepcopy_atomic
except AttributeError:
pass
d[types.StringType] = _deepcopy_atomic
try:
d[types.UnicodeType] = _deepcopy_atomic