summaryrefslogtreecommitdiffstats
path: root/Lib/copy.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2014-02-27 21:14:31 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2014-02-27 21:14:31 (GMT)
commitdc9215f8828b23ed6c294f8e64342a55dcdf1e4c (patch)
treed4cc4203e175728a19a15e7f785a264297a6a883 /Lib/copy.py
parent85736a7d2c4fcb0369becf59b143e5035a2adc23 (diff)
downloadcpython-dc9215f8828b23ed6c294f8e64342a55dcdf1e4c.zip
cpython-dc9215f8828b23ed6c294f8e64342a55dcdf1e4c.tar.gz
cpython-dc9215f8828b23ed6c294f8e64342a55dcdf1e4c.tar.bz2
Issue #20791: copy.copy() now doesn't make a copy when the input is a bytes object. Initial patch by Peter Otten.
Diffstat (limited to 'Lib/copy.py')
-rw-r--r--Lib/copy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/copy.py b/Lib/copy.py
index d26bcdb..bb8840e 100644
--- a/Lib/copy.py
+++ b/Lib/copy.py
@@ -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