Use Pyrex instead (Re: newbie at SWIG, help needed with typemaps)
Greg Ewing (using news.cis.dfn.de)
ckea25d02 at sneakemail.com
Tue Apr 1 20:14:03 EST 2003
Duncan Booth wrote:
> I, of course, misread this and wrote:
>
> cdef class Spam:
> method = classmethod(Spam)
Hmmm, maybe I should make it clearer that I'm only talking about
Python classes here, not extension types.
> This gives an error from the C compiler: 'method' undeclared identifier.
> Fair enough that it doesn't work (the documentation sort of says it won't),
> but not so good that it generated bad C code.
That appears to be a bug -- it shouldn't be letting you
put anything other than declarations inside a cdef class
in the first place. I'll see about fixing this.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list