[Cython] nonecheck directive

Robert Bradshaw robertwb at math.washington.edu
Fri May 20 17:33:44 CEST 2011


On Fri, May 20, 2011 at 8:13 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Hi,
>
> why is the "nonecheck" directive set to False by default? Shouldn't it
> rather be a "I know what I'm doing" option that allows advanced users to
> trade speed for safety?
>
> The reason I'm asking is that I just enabled its evaluation in NoneCheckNode
> and immediately got crashes in the test suite. So its currently only
> half-heartedly safe because it's not being evaluated in a lot of places.
> That's a rather fragile situation, not only for refactorings.

The reasoning was that we didn't want to have a major performance
regression on existing code has already been written knowing these
semantics, and also that we eventually plan to solve this more
gracefully using control flow.

- Robert


More information about the cython-devel mailing list