Stefan wrote: > > Danilo Freitas, 29.01.2010 19:05: >> 2010/1/29 Stefan Behnel : >>> Danilo Freitas, 29.01.2010 04:34: >>>> As you know, Robert is planning to put the work about C++ Support in >>>> next release. So, we have some new stuff, and people need to learn it. >>>> >>>> I wrote a very simple tutorial on wiki [0], with some examples. I >>>> think it's easy to learn (and use) it. >>> Thanks, there seems to be a lot in there (feature-wise). >>> >>> >>>> So, if you have any questions about it, just ask here. >>>> >>>> [0] http://wiki.cython.org/gsoc09/daniloaf/progress >>> One thing that strikes me: Is "new" a keyword now? I don't find that a >>> good >>> idea - it will break existing code at best. Why was this chosen over >>> something like "cython.new()"? Or is it only enabled when compiling C++ >>> code? That would be bad enough, but would at least make it less likely >>> to >>> break code. >> >> I didn't think about that. I just thought using 'new' like C++ would >> be very simple. > > It's not very pythonic, though. I think a function makes more sense. > > I assume there is a reason why calling the constructor isn't enough?
I'm opposed to just calling the constructor. Everywhere else a constructor is called, a refcounted reference is returned. It is good to be very explicit about the fact that the pointer must be freed, and that this is dissimilar from instantiating Cython classes. Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
