[Cython] special case Py_None at __Pyx_PyObject_IsTrue()

Stefan Behnel stefan_ml at behnel.de
Fri Feb 6 20:57:14 CET 2009


Lisandro Dalcin wrote:
> What do you think about this?

Fine with me. None is a very common value and often used in boolean checks like

    if reference_that_may_be_None:
        ...

I bet the C compiler will even be able to figure out that such a variable
is None in some simple cases.

Stefan



More information about the Cython-dev mailing list