I'm not convinced that compiler directives like "infer_types" should propagate into the cimported files at all.

It seems reasonable to me that these should be controlled by the author of the pxd file, not by the eventual cimporter.



On 02/08/2020 14:18, Stefan Behnel wrote:
Oliver Haas schrieb am 02.08.20 um 13:44:
The array.pxd (
https://github.com/cython/cython/blob/master/Cython/Includes/cpython/array.pxd)
requires infer_types = True when cimported. Is there a reason not to
explicitly type the variable op as array in the lines 134 and 141?
The return type of the function that creates the object is known, so the
normal (safe) type inference should work here without setting
"infer_types=True". Do you want to set "infer_types=False", or why is this
failing for you?

Stefan
_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel


_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to