[Pyrex] Pyrex checks type of literal None argument
    Greg Ewing 
    greg.ewing at canterbury.ac.nz
       
    Wed May 24 01:29:17 UTC 2006
    
    
  
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.
I could perhaps be a bit smarter about handling the
types of constant expressions. I'll file this under
Suggestions.
Thanks,
Greg
    
    
More information about the Pyrex
mailing list