[Pyrex] [Cython-dev] Is there any problem with having "except *" as the default behavior for cdef funcs?

William Stein wstein at gmail.com
Wed Sep 12 19:06:13 CEST 2007


On 9/12/07, Robert Bradshaw <robertwb at math.washington.edu> wrote:
> The beauty of the except clause is that PyErr_Occurred is not called,
> instead just does a check to see if the returned value matches the
> except value, which is much faster. I think, however, if the except
> value matches PyErr_Occurred should still probably be called to
> verify it is an error rather than a valid value. (Put that on the
> todo list...)

Hey, that might be a really good idea, though with Python often
having an error occur is the normal flow of control, and adding
extra overhead to that which is not needed might be bad.  Thoughts?

 William



More information about the Pyrex mailing list