Re: [sage-devel] Proposal: make _cmp_c_impl() override __cmp__()

2015-03-04 Thread Nicolas M. Thiery
On Wed, Mar 04, 2015 at 05:17:02AM -0800, Jean-Pierre Flori wrote: The few times I played with comparison functions, I found what we have quite confusing, especially the discrpancy between Python and Cython classes, so any simplification would be welcomed. And if it also eases the

[sage-devel] Proposal: make _cmp_c_impl() override __cmp__()

2015-03-04 Thread Jeroen Demeyer
Hello, I am trying to simplify and optimize the comparison part of the coercion framework at #17890. There is one convention we currently have in Sage which is posing an obstacle: if a Python class (not a Cython cdef class) inheriting from Element defines both _cmp_c_impl and __cmp__, then

Re: [sage-devel] Proposal: make _cmp_c_impl() override __cmp__()

2015-03-04 Thread John Cremona
For the last two in your list it is quite possible that I wrote the code and did not understand what I was doing at the time, just happy that what I wrote worked. (Particularly true of the WeierstrassIsomorphism code which I wrote in 2007, the very first Sage/python code I ever did write). So

Re: [sage-devel] Proposal: make _cmp_c_impl() override __cmp__()

2015-03-04 Thread Jean-Pierre Flori
The few times I played with comparison functions, I found what we have quite confusing, especially the discrpancy between Python and Cython classes, so any simplification would be welcomed. And if it also eases the transition towards Python 3 that would be great. -- You received this message