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
Python 3.6.2 (default, Jul 17 2017, 16:44:32)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import typing
>>> class Foo(typing.Sequence):
... pass
...
>>> Foo.__copy__()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/typing.py", line 1189, in __copy__
self.__extra__, self.__orig_bases__)
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/typing.py", line 953, in __new__
assert origin is not None
AssertionError
>>> typing.Sequence.__copy__()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/typing.py", line 1189, in __copy__
self.__extra__, self.__orig_bases__)
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/typing.py", line 953, in __new__
assert origin is not None
AssertionError
>>> typing.Sequence[typing.T_co].__copy__()
typing.Sequence[+T_co]
The text was updated successfully, but these errors were encountered:
You should never call __copy__ directly, it only exists for backwards compatibility with Python 3.2 (which was removed recently due to Python 3.2 reaching EoL, so that __copy__ could be actually removed at any time).
Example:
The text was updated successfully, but these errors were encountered: