mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Copy builtin functions as atomic. Fixes #746304. Will backport to 2.2.
This commit is contained in:
parent
c1aa8dceb7
commit
ba8f5ff76c
3 changed files with 5 additions and 2 deletions
|
@ -120,6 +120,7 @@ except AttributeError:
|
|||
d[types.TypeType] = _copy_atomic
|
||||
d[types.XRangeType] = _copy_atomic
|
||||
d[types.ClassType] = _copy_atomic
|
||||
d[types.BuiltinFunctionType] = _copy_atomic
|
||||
|
||||
def _copy_list(x):
|
||||
return x[:]
|
||||
|
@ -233,6 +234,7 @@ except AttributeError:
|
|||
d[types.TypeType] = _deepcopy_atomic
|
||||
d[types.XRangeType] = _deepcopy_atomic
|
||||
d[types.ClassType] = _deepcopy_atomic
|
||||
d[types.BuiltinFunctionType] = _deepcopy_atomic
|
||||
|
||||
def _deepcopy_list(x, memo):
|
||||
y = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue