Hi Simon,

> > Removing the offending __richcmp__ in
> > FreeModuleElement seems to solve the problem once for all for all rings but
> > introduce a lot of other problems.
> 
> What other problems emerge?

Actually, I was wrong saying that this solves the problem. The result is much
faster but incorrect.

> Given the comment from sage/structure/element.pyx, I think
> that method should be renamed into _richcmp_c_impl.

This doesn't work either with seemingly the same error as if I remove
__richcmp__. 

> > Also it is very likely that the same problem is occuring in different
> > places (not only the various vector classes) and I'm not completely sure
> > where to look. I'd rather have an automatic way to find all the places
> > where this fails and also add the check to TestSuite if possible. Does
> > anyone have a suggestion for that ?
>
> I am not sure what you are trying to do. Do you want to detect Cython
> classes that inherit from sage.structure.element.Element and do not copy
> their __cmp__ method as they should?

Sorry, I wasn't clear. What you describe is exactly what I want to do.

> I am not sure how this could be done without source inspection.

Precisely! I'd like to do it from inside the Python interpreter by
introspection. Unfortunately, I think that this can't be done.

This is now #12923

Cheers,

Florent

-- 
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