[Cython] Raising exceptions under python 2.5

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jul 15 02:26:40 CEST 2008


Stefan Behnel wrote:

> it's actually faster to write
> 
>   raise KeyError, "No _ObserverItem found belonging to '%s'." % observer

But only if the exception is both raised and caught in
Pyrex or Cython code (because no exception instance is
created). Otherwise it makes little difference.

-- 
Greg


More information about the Cython-dev mailing list