[Pyrex] A couple of questions about pyrex
Robert Bradshaw
robertwb at math.washington.edu
Wed May 13 04:09:06 CEST 2009
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 <robertwb at math.washington.edu>
> 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
More information about the Pyrex
mailing list