You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<pyshell#2>", line 1, in ?
copy.deepcopy(max)
File "C:\PYTHON23\lib\copy.py", line 205, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "C:\PYTHON23\lib\copy.py", line 336, in _reconstruct
y =callable(*args)
File "C:\PYTHON23\Lib\copy_reg.py", line 84, in __newobj__returncls.__new__(cls, *args)
TypeError: object.__new__(builtin_function_or_method) is not
safe, use builtin_function_or_method.__new__()
Steven Taschuk's guess is that all things pickleable should be
copyable since copy uses the same protocol as pickle. (He is
not sure though) He demonstrates this idea with the following
example:
>>> import pickle
>>> pickle.loads(pickle.dumps(max))
<built-in function max>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: