mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00: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
1 changed files with 8 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue