Stefan Behnel wrote:
> The grammar of the cdef statement is pretty bizarre.
Talking about "the cdef statement" is a bit misleading.
The way I think of it in Pyrex, there isn't a single
cdef statement. Rather, there is a cdef prefix that
can be applied to declarations or suites of declarations
to give them a different meaning.
Since 'pass' is a valid declaration statement (it needs
to be so that you can have empty suites of declarations),
'cdef pass' becomes a slightly fancier way of writing
an empty declaration. It might look a bit odd, but it
doesn't do any harm to allow it, IMO.
Another thing you need to be careful not to break is
cdef:
<statements>
where all the statements in the suite are treated as
though they were prefixed with cdef (including pass
statements!).
--
Greg
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev