[Pyrex] Pyrex checks type of literal None argument

Stefan Behnel behnel_ml at gkec.informatik.tu-darmstadt.de
Fri May 26 05:17:23 UTC 2006



Greg Ewing wrote:
> Stefan Behnel wrote:
> 
>>   value = factory(somepointer, None)
>>
>> Pyrex generates this code for it:
>>
>>   if (!__Pyx_TypeTest(Py_None, __pyx_ptype_5etree__SomeType)) { ... }
> 
> At the point where this is done, Pyrex doesn't know
> that it's not just a generic Python value.

Note that None has been a keyword in CPython for a while. There is most likely
not much code that might suffer from making it a keyword in Pyrex, too.

Stefan




More information about the Pyrex mailing list