-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Code GenerationPython SemanticsGeneral Python (3) language semanticsGeneral Python (3) language semanticsfeature
Milestone
Description
Seems that Generic.__class_getitem__ can't be called automatically after cythonization.
Code sample example.py:
from typing import Generic, TypeVar
T = TypeVar("T")
print(Generic[T])Cythonization:
cythonize -a -i example.py
The cythonized code fails with TypeError:
>>> import example
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "example.py", line 5, in init example
print(Generic[T])
TypeError: 'type' object is not subscriptable
Cython 0.29.1
Python 3.7.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Code GenerationPython SemanticsGeneral Python (3) language semanticsGeneral Python (3) language semanticsfeature