Danilo Freitas wrote:
> Hi, all.
> For my GSoC work with C++ Support, I need to know if we'll use the
> Python '__init__' special method or use C++ way, with the constructor
> with the same name of the class:
>
> class Foo
> {
> public:
> Foo() { } //constructor
> }
>
> For this, we need your vote.
>
> Know that the choose of the syntax will not change our work to
> implement. Just choose wich will be better for you :)
>
> So, shich do you prefer? (I'm neutral on it)
Well, what is the syntax going to be for other operators? I.e. I would
think you could have either
cdef extern cppclass Foo: # or whatever
Foo(int a, int b)
Foo operator+(Foo other)
or
cdef extern cppclass Foo:
def __init__(self, int a, int b)
def Foo __add__(self, Foo other)
or
cdef extern cppclass Foo:
cdef __init__(self, int a, int b)
cdef Foo __add__(self, Foo other)
but I wouldn't feel happy about a mixture of those.
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev