[Cython] cython doesn't compile cdef'd variables of type set?
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Oct 3 03:47:37 CEST 2008
didier deshommes wrote:
> Cython fails with a syntax error on "cdef set s".
The reason for the syntax error is that the parser doesn't
suspect that 'set' might be a type name.
Not sure about Cython, but in Pyrex the parser's list of
possible type names is seeded from the tables in Builtin.py.
If 'set' is declared there as something of type 'type',
that should fix the syntax error.
(The need for the parser to know about type names is a
bit hacky, but C's screwy declaration syntax makes it
hard to avoid when using an LL(1) parser.)
--
Greg
More information about the Cython-dev
mailing list