[Pyrex] Initialisation of cdef global arrays with constants [resend]

sjmachin at lexicon.net sjmachin at lexicon.net
Fri Jan 28 23:32:02 CET 2005


On 29 Jan 2005 at 10:50, Greg Ewing wrote:

> > Note the "raise" where in C one would return NULL --
>  > pyrex cracks it on return NULL, muttering about returning
>  > a value from a void function.
> 
> You can't return NULL from a Python function, because
> Python functions can only return Python values. Not
> sure why it should say anything about void functions,
> though -- that might be a bug.
> 

Where I'm coming from is (my belief/understanding) that a "Python function" hand 
coded in C _should_ return NULL in this circumstance, so that the precise exception set 
by the called function can be thrown, instead of a guess.



More information about the Pyrex mailing list