1
2
3
4
5
6
7
8
9
|
Feature ,Cython 0.29 ,Cython 3.0
``int``,Any Python object,Exact Python ``int`` (``language_level=3`` only)
``float``,,C ``double``
"Builtin type e.g. ``dict``, ``list`` ",,"Exact type (no subclasses), not ``None``"
Extension type defined in Cython ,,"Specified type or a subclasses, not ``None``"
"``cython.int``, ``cython.long``, etc. ",,Equivalent C numeric type
``typing.Optional[any_type]``,Not supported,"Specified type (which must be a Python object), allows ``None``"
``typing.List[any_type]`` (and similar) ,Not supported,"Exact ``list``, with the element type ignored currently "
``typing.ClassVar[...]`` ,Not supported,Python-object class variable (when used in a class definition)
|