Re: A couple of questions about pyrex

"Stefan Behnel" <[email protected]> Tue, 12 May 2009 17:50:16 +0200 (CEST)
Newsgroups gmane.comp.python.pyrex
Message-ID <84e7d2f5189c0ae806626ca25a872b73.squirrel@groupware.dvs.informatik.tu-darmstadt.de>
Yingjie Lan wrote:
> I would say that
> it seems to me pyrex decides on each statement whether
> to treat it as pythonic or native (c/c++). Then can we
> say that we make this distinction between 'cdef class' and
> 'class' by checking if the class body contains any
> statement treated as native?

No, because this will not work then:

    class MyClass: pass

    MyClass.some_attribute = 1

Stefan