Re: A couple of questions about pyrex
Robert Bradshaw <[email protected]> Tue, 12 May 2009 19:09:06 -0700
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
I meant to send this to the list... On May 12, 2009, at 4:12 PM, Yingjie Lan wrote: > > --- On Wed, 5/13/09, Robert Bradshaw <[email protected]> > wrote: > >> cdef class A: >> pass >> >> and >> >> class A: >> pass >> >> create very different objects. Implicitly creating one or >> the other depending on the contents of the body seems like a >> bad idea. Maybe if/once we have extension classes that >> behave semantically exactly like Python classes we could do >> this, but the "cdef class" wouldn't go away >> (in Cython at least) because one often wants the extension >> type behavior. >> > > Thanks for the explanation. Could you please also elaborate on the > difference between the created objects and why people would want to > have the difference? As well as what Greg Ewing stated, normal Python classes support multiple inheritance and come with default support for pickling/copy. - Robert