mirror of
https://github.com/python/cpython.git
synced 2024-12-03 23:06:43 +08:00
Add complex to the dispatch tables, to avoid going through the whole
rigmarole of __reduce__.
This commit is contained in:
parent
6cef6d5d62
commit
8b9def3aac
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user