With cython 3.0.0+ we can write a function that is compiled with two different conditions:
cdef double square(double x) noexcept nogil:
return x * x
In this particular case, we are telling cython that square can be compiled with out the gil and to ignore exceptions that are raised in its body. However, the cython extension for VS code marks this as a syntax error:
The use of "noexcept nogil" is quickly becoming popular for functions that need the most performance and are unlikely to encounter problems with disabling those features (see, for example, some of the functions here used for scipy). So it would be nice if the syntax checker took this feature into account.
Thank you for your work on this, it is a very useful extension!
With cython 3.0.0+ we can write a function that is compiled with two different conditions:
In this particular case, we are telling cython that
square
can be compiled with out the gil and to ignore exceptions that are raised in its body. However, the cython extension for VS code marks this as a syntax error:The use of "noexcept nogil" is quickly becoming popular for functions that need the most performance and are unlikely to encounter problems with disabling those features (see, for example, some of the functions here used for scipy). So it would be nice if the syntax checker took this feature into account.
Thank you for your work on this, it is a very useful extension!