[Cython] Annotations and Cython 3

Stefan Behnel stefan_ml at behnel.de
Tue Oct 26 02:53:31 EDT 2021


Am 26. Oktober 2021 07:54:10 MESZ schrieb Lisandro Dalcin:
>In any case, if you know how and can implement the __future__ import,
>that
>would be great. Otherwise, valid Python3 code using that import
>currently fails to compile in Cython.

Probably just an oversight. A no-op future import is trivial to add and ignore.

>In addition, perhaps you should consider adding a compiler directive

There is one (annotation_typing) that controls whether Cython reads annotations as types or not (which isn't what you're asking for). Apart from that, since there is no future unimport, there should probably be a way to get either behaviour, regardless of the default.

Stefan


More information about the cython-devel mailing list