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]
Example: