[Cython] Minor issue with switch conversion

Stefan Behnel stefan_ml at behnel.de
Fri Nov 7 06:57:31 CET 2008


Hi,

Jason Evans wrote:
> The switch conversion, as described at:
> 
> 	http://wiki.cython.org/enhancements/switch
> 
> causes a compilation error for the following code:
> 
> ===============
> cdef int x = 42
> 
> if x == 1:
>      print x
> elif x == 2:
>      print x
> else:
>      pass
> ===============
> 
> This is due to generating an empty default: clause.

Thanks for this very complete bug report. Fixed.

http://hg.cython.org/cython-devel/rev/1f4f07a63dba

Stefan



More information about the Cython-dev mailing list