[Pyrex] char specifier in enum

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Feb 22 21:11:58 CET 2008


Simon Burton wrote:
> I have a simple example:
> 
> cdef enum foo:
>     A = 'A'
>     B = 'B'

You want to use character literals here:

   cdef enum foo:
      A = c'A'
      B = c'B'

You should really get an error rather than incorrect code
generated though, so I'll file this as a bug.

--
Greg



More information about the Pyrex mailing list