On Tue, Jul 27, 2010 at 02:05:21AM -0700, Robert Bradshaw wrote:
> > Option 4 is to fix this defect in Cython. I played around with this
> > the other night and the problem is this: the Python C API has only one
> > slot for both __getattr__ and __getattribute__. If you only overload
> > the former, CPython can't tell, and assumes you overrode the latter.
> > It then creates a pure Python stub in your Python classes which call
> > the __getattribute__ wrapper via Python semantics. I'm thinking if we
> > can surpress or delete that wrapper if only __getattr__ is implemented
> > then it will just inherit the slot. I haven't had a chance to try this
> > out though.
> 
> And, catching up on my Cython email, Carl Witty may have essentially
> done this! http://trac.cython.org/cython_trac/ticket/561

Carl, Robert, thanks so much for investigating this!

Wow a general speed improvement over all non cdef classes will be good :-)
I am looking forward timing results and trying it out!

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to