Skip to content

Commit 5b6a4c4

Browse files
committed
Update copy.py from CPython 3.11
1 parent 2723336 commit 5b6a4c4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Lib/copy.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class instances).
3939
set of components copied
4040
4141
This version does not copy types like module, class, function, method,
42-
nor stack trace, stack frame, nor file, socket, window, nor array, nor
43-
any similar types.
42+
nor stack trace, stack frame, nor file, socket, window, nor any
43+
similar types.
4444
4545
Classes can use the same interfaces to control copying that they use
4646
to control pickling: they can define methods called __getinitargs__(),
@@ -192,6 +192,7 @@ def _deepcopy_atomic(x, memo):
192192
d[str] = _deepcopy_atomic
193193
d[types.CodeType] = _deepcopy_atomic
194194
d[type] = _deepcopy_atomic
195+
d[range] = _deepcopy_atomic
195196
d[types.BuiltinFunctionType] = _deepcopy_atomic
196197
d[types.FunctionType] = _deepcopy_atomic
197198
d[weakref.ref] = _deepcopy_atomic
@@ -257,7 +258,7 @@ def _keep_alive(x, memo):
257258

258259
def _reconstruct(x, memo, func, args,
259260
state=None, listiter=None, dictiter=None,
260-
deepcopy=deepcopy):
261+
*, deepcopy=deepcopy):
261262
deep = memo is not None
262263
if deep and args:
263264
args = (deepcopy(arg, memo) for arg in args)

0 commit comments

Comments
 (0)