mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
Issue #20791: copy.copy() now doesn't make a copy when the input is a bytes object. Initial patch by Peter Otten.
This commit is contained in:
parent
85736a7d2c
commit
dc9215f882
3 changed files with 5 additions and 1 deletions
|
@ -110,7 +110,7 @@ _copy_dispatch = d = {}
|
|||
def _copy_immutable(x):
|
||||
return x
|
||||
for t in (type(None), int, float, bool, str, tuple,
|
||||
frozenset, type, range,
|
||||
bytes, frozenset, type, range,
|
||||
types.BuiltinFunctionType, type(Ellipsis),
|
||||
types.FunctionType, weakref.ref):
|
||||
d[t] = _copy_immutable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue