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
pass
tests = [None, 42, 2**100, 3.14, True, False, 1j,
"hello", "hello\u1234", f.__code__,
+ b"world", bytes(range(256)),
NewStyle, range(10), Classic, max, WithMetaclass]
for x in tests:
self.assertIs(copy.copy(x), x)
Library
-------
+- Issue #20791: copy.copy() now doesn't make a copy when the input is
+ a bytes object. Initial patch by Peter Otten.
+
- Issue #19748: On AIX, time.mktime() now raises an OverflowError for year
outsize range [1902; 2037].