Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-25 Thread Simon Brandhorst
Okay I made it work with __richcmp__ as suggested. 

Please review :-) . 

On Tuesday, October 24, 2017 at 7:53:46 AM UTC+2, Simon Brandhorst wrote:
>
> Ahhh
>
> On Monday, October 23, 2017 at 6:09:02 PM UTC+2, David Roe wrote:
>>
>>
>>
>> On Mon, Oct 23, 2017 at 8:24 AM, Simon Brandhorst  
>> wrote:
>>
>>> I am aware of this. It is just unexpected that other.__eq__(self) calls
>>> self._eq(other)
>>>
>>> As a user of that rich cmp method I would have expected it to call
>>> other._eq(self).
>>>
>>> Raising a not implemented error seems nice. :)
>>>
>>
>> Note that it should return NotImplemented (a built in constant to be 
>> returned by rich comparisons), not raise a NotImplementedError.
>> David
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread Simon Brandhorst
Ahhh

On Monday, October 23, 2017 at 6:09:02 PM UTC+2, David Roe wrote:
>
>
>
> On Mon, Oct 23, 2017 at 8:24 AM, Simon Brandhorst  > wrote:
>
>> I am aware of this. It is just unexpected that other.__eq__(self) calls
>> self._eq(other)
>>
>> As a user of that rich cmp method I would have expected it to call
>> other._eq(self).
>>
>> Raising a not implemented error seems nice. :)
>>
>
> Note that it should return NotImplemented (a built in constant to be 
> returned by rich comparisons), not raise a NotImplementedError.
> David
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread Travis Scrimshaw


> I am aware of this. It is just unexpected that other.__eq__(self) calls
>> self._eq(other)
>>
>> As a user of that rich cmp method I would have expected it to call
>> other._eq(self).
>>
>> Raising a not implemented error seems nice. :)
>>
>
> Note that it should return NotImplemented (a built in constant to be 
> returned by rich comparisons), not raise a NotImplementedError.
>
>
There is also precedent in Python for raising a TypeError with < and > too. 
However, I think that causes more headaches than it solves.

Best,
Travis

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread David Roe
On Mon, Oct 23, 2017 at 8:24 AM, Simon Brandhorst 
wrote:

> I am aware of this. It is just unexpected that other.__eq__(self) calls
> self._eq(other)
>
> As a user of that rich cmp method I would have expected it to call
> other._eq(self).
>
> Raising a not implemented error seems nice. :)
>

Note that it should return NotImplemented (a built in constant to be
returned by rich comparisons), not raise a NotImplementedError.
David

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread Simon Brandhorst
I am aware of this. It is just unexpected that other.__eq__(self) calls
self._eq(other)

As a user of that rich cmp method I would have expected it to call
other._eq(self).

Raising a not implemented error seems nice. :)
Anyways I believe it should be better documented if you want people to use 
these functions. 

On Monday, October 23, 2017 at 10:51:29 AM UTC+2, Jeroen Demeyer wrote:
>
> This is an infinite loop: 
>
> : if type(other)!=type(self): 
> : #other knows how to do the comparison 
> : return other.__eq__(self) 
>
> The correct Python thing to do is to return NotImplemented in this case. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread Jeroen Demeyer

This is an infinite loop:

: if type(other)!=type(self):
: #other knows how to do the comparison
: return other.__eq__(self)

The correct Python thing to do is to return NotImplemented in this case.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-23 Thread Simon Brandhorst
Mhh okay, I can see that point.

On Monday, October 23, 2017 at 6:23:50 AM UTC+2, Travis Scrimshaw wrote:
>
>
>
> On Thursday, October 19, 2017 at 8:59:17 PM UTC-5, Simon Brandhorst wrote:
>>
>> Well richcmp allows you to define just one method. But it does not save 
>> you any work at all if the order is partial. 
>> Because then you have to distinguish the cases op = op_LE , op_GE, op_LT 
>> ... etc.  so all that you save is documentation and everything is more 
>> obscure.
>>
>
> It depends. In fact, it can make the code easier to follow and maintain 
> because you can do common cases for NE or for LT and LE. In fact, I might 
> be so bold as to say that is what happens generally (how often is the first 
> thing you do is verify the object has a compatible type?).
>
> Best,
> Travis
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-22 Thread Travis Scrimshaw


On Thursday, October 19, 2017 at 8:59:17 PM UTC-5, Simon Brandhorst wrote:
>
> Well richcmp allows you to define just one method. But it does not save 
> you any work at all if the order is partial. 
> Because then you have to distinguish the cases op = op_LE , op_GE, op_LT 
> ... etc.  so all that you save is documentation and everything is more 
> obscure.
>

It depends. In fact, it can make the code easier to follow and maintain 
because you can do common cases for NE or for LT and LE. In fact, I might 
be so bold as to say that is what happens generally (how often is the first 
thing you do is verify the object has a compatible type?).

Best,
Travis

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-21 Thread Simon Brandhorst
from sage.structure.richcmp import richcmp_by_eq_and_lt,richcmp_method


@richcmp_method
class A(object):
def __init__(self,x):
self._x = x
__richcmp__ = richcmp_by_eq_and_lt("_eq","_lt")
def _eq(self,other):
if type(other)!=type(self):
#other knows how to do the comparison
return other.__eq__(self)
return self._x == other._x
def _lt(self,other):
return self._x in ()
> 1 A(Integer(1)) == B(Integer(1),"a")

/home/simon/sage/src/sage/structure/richcmp.pyx in 
sage.structure.richcmp.slot_tp_richcompare 
(build/cythonized/sage/structure/richcmp.c:1459)()
110 Function to put in the ``tp_richcompare`` slot.
111 """
--> 112 return self.__richcmp__(other, op)
113 
114 

/home/simon/sage/src/sage/structure/richcmp.pyx in 
sage.structure.richcmp.richcmp_by_eq_and_lt.richcmp 
(build/cythonized/sage/structure/richcmp.c:2178)()
317 if equal_types:
318 other_eq = getattr(other, eq_attr)
--> 319 if other_eq(self):
320 return rich_to_bool(op, 0)
321 if op == Py_EQ:

/home/simon/sage/src/sage/modules/bug.py in _eq(self, other)
 10 if type(other)!=type(self):
 11 #other knows how to do the comparison
---> 12 return other.__eq__(self)
 13 return self._x == other._x
 14 def _lt(self,other):

... last 3 frames repeated, from the frame below ...

/home/simon/sage/src/sage/structure/richcmp.pyx in 
sage.structure.richcmp.slot_tp_richcompare 
(build/cythonized/sage/structure/richcmp.c:1459)()
110 Function to put in the ``tp_richcompare`` slot.
111 """
--> 112 return self.__richcmp__(other, op)
113 
114 

RuntimeError: maximum recursion depth exceeded while calling a Python object
Enter code here...

This is unexpected but we know what to do
from sage.structure.richcmp import richcmp_by_eq_and_lt,richcmp_method


@richcmp_method
class A(object):
def __init__(self,x):
self._x = x
__richcmp__ = richcmp_by_eq_and_lt("_eq","_lt")
def _eq(self,other):
if type(other)!=type(self):
#other knows how to do the comparison
return self.__eq__(other)
return self._x == other._x
def _lt(self,other):
return self._xhttps://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-20 Thread Jeroen Demeyer
If you say that something does not work, it would be good to show a 
simple example of what you did. It is impossible for me to understand 
why your code doesn't work without seeing your code.


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-20 Thread Simon Brandhorst
/home/simon/sage/src/sage/structure/richcmp.pyx in 
sage.structure.richcmp.richcmp_by_eq_and_lt.richcmp 
(build/cythonized/sage/structure/richcmp.c:2172)()
317 if equal_types:
318 other_eq = getattr(other, eq_attr)
--> 319 if other_eq(self):
320 return rich_to_bool(op, 0)
321 if op == Py_EQ:

TypeError: unbound method _eq_() must be called with 
FreeModule_ambient_field_with_category instance as first argument (got 
FreeModule_submodule_field_with_category instance instead)

probably there should be 
319if other.other_eq(self)
or maybe
319other.__eq__(self)

Also when having many different subclasses which have to compare this 
lt_by_eq_and_lt does not work. As it gives the comparison to the other 
element all the time. But I think that is really something that the user 
should decide in his code if he wants it. This does too much.
For me this resulted in circular references etc... so it was a pain to get 
it work.

if not equal_types:
try:
other_eq = getattr(other, eq_attr)
other_lt = getattr(other, lt_attr)


On Friday, October 20, 2017 at 3:59:17 AM UTC+2, Simon Brandhorst wrote:
>
> Well richcmp allows you to define just one method. But it does not save 
> you any work at all if the order is partial. 
> Because then you have to distinguish the cases op = op_LE , op_GE, op_LT 
> ... etc.  so all that you save is documentation and everything is more 
> obscure.
>
> I also tried the richcmp_by_eq_and_lt in principle it is a nice idea and 
> exactly what I need.
> In practice it does not work. Well I could get it to work and all doctests 
> in the free_module.py and free_quadratic_module.py passed. But when testing 
> the whole module folder everything exploded.
> With commit b59062520b9b8e99e8ee126cbf209feb241a596a
>
> TypeError: _eq_() takes exactly 2 arguments (1 given)
> TypeError: unbound method _eq_() must be called with 
> FreeModule_submodule_pid_with_category instance as first argument (got 
> FreeModule_submodule_with_basis_pid_with_category instance instead)
> TypeError: unbound method _eq_() must be called with 
> FreeModule_submodule_field_with_category instance as first argument (got 
> FreeModule_submodule_with_basis_field_with_category instance instead)
> etc. etc. 
>
> So my solution was to remove the @richcmp decorator and the richcmp_by_eq 
> method. Then implement __neq__, __geq__ __leq__ by hand. 
> You can see it in #23978.
>
> It needs review :).
>
> So I expect that the richcmp_by_eq_and_lt does not work properly?
> Also lt is harder to implement they le. That would be nice to have too?
>
> On Tuesday, October 17, 2017 at 8:13:59 PM UTC+2, Travis Scrimshaw wrote:
>>
>>
>>
>> On Tuesday, October 17, 2017 at 9:55:25 AM UTC-5, Simon Brandhorst wrote:
>>>
>>> I got that now. But at the time I thought __richcmp__ was just a fancy 
>>> new name for the old __cmp__ in python in order to make it python 3 
>>> compatible. 
>>>
>>> Anyways. It would be nice to say something like that in the 
>>> documentation. (Maybe I have just missed it and it is there already.)
>>> "
>>> @richcmp_method simply allows to define just 
>>> one comparison method __richcmp__ instead of six __eq__, __lt__, ... "
>>> "
>>> and add a reference to some working example somewhere in the sage 
>>> library.
>>> As many people will come across that file who are not programmers and do 
>>> not speak cython.
>>> And in future they will also not know about the __cmp__ method of python 
>>> 2.7
>>>
>>> In Python, those are called rich comparisons and returning 
>> NotImplemented is a Python thing for rich comparisons, including in things 
>> like __eq__. So it doesn't have to do with speaking Cython. IMO, anytime 
>> you want to find an example in the Sage library, grep is your friend and is 
>> more robust than in some place in the documentation that could (quickly) go 
>> out of date. However, I agree with you that the documentation could be 
>> improved by stating about returning NotImplemented and having a more 
>> complete example.
>>
>> Best,
>> Travis
>>
>>  
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-19 Thread Simon Brandhorst
Well richcmp allows you to define just one method. But it does not save you 
any work at all if the order is partial. 
Because then you have to distinguish the cases op = op_LE , op_GE, op_LT 
... etc.  so all that you save is documentation and everything is more 
obscure.

I also tried the richcmp_by_eq_and_lt in principle it is a nice idea and 
exactly what I need.
In practice it does not work. Well I could get it to work and all doctests 
in the free_module.py and free_quadratic_module.py passed. But when testing 
the whole module folder everything exploded.
With commit b59062520b9b8e99e8ee126cbf209feb241a596a

TypeError: _eq_() takes exactly 2 arguments (1 given)
TypeError: unbound method _eq_() must be called with 
FreeModule_submodule_pid_with_category instance as first argument (got 
FreeModule_submodule_with_basis_pid_with_category instance instead)
TypeError: unbound method _eq_() must be called with 
FreeModule_submodule_field_with_category instance as first argument (got 
FreeModule_submodule_with_basis_field_with_category instance instead)
etc. etc. 

So my solution was to remove the @richcmp decorator and the richcmp_by_eq 
method. Then implement __neq__, __geq__ __leq__ by hand. 
You can see it in #23978.

It needs review :).

So I expect that the richcmp_by_eq_and_lt does not work properly?
Also lt is harder to implement they le. That would be nice to have too?

On Tuesday, October 17, 2017 at 8:13:59 PM UTC+2, Travis Scrimshaw wrote:
>
>
>
> On Tuesday, October 17, 2017 at 9:55:25 AM UTC-5, Simon Brandhorst wrote:
>>
>> I got that now. But at the time I thought __richcmp__ was just a fancy 
>> new name for the old __cmp__ in python in order to make it python 3 
>> compatible. 
>>
>> Anyways. It would be nice to say something like that in the 
>> documentation. (Maybe I have just missed it and it is there already.)
>> "
>> @richcmp_method simply allows to define just 
>> one comparison method __richcmp__ instead of six __eq__, __lt__, ... "
>> "
>> and add a reference to some working example somewhere in the sage library.
>> As many people will come across that file who are not programmers and do 
>> not speak cython.
>> And in future they will also not know about the __cmp__ method of python 
>> 2.7
>>
>> In Python, those are called rich comparisons and returning NotImplemented 
> is a Python thing for rich comparisons, including in things like __eq__. So 
> it doesn't have to do with speaking Cython. IMO, anytime you want to find 
> an example in the Sage library, grep is your friend and is more robust than 
> in some place in the documentation that could (quickly) go out of date. 
> However, I agree with you that the documentation could be improved by 
> stating about returning NotImplemented and having a more complete example.
>
> Best,
> Travis
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-17 Thread Travis Scrimshaw


On Tuesday, October 17, 2017 at 9:55:25 AM UTC-5, Simon Brandhorst wrote:
>
> I got that now. But at the time I thought __richcmp__ was just a fancy new 
> name for the old __cmp__ in python in order to make it python 3 compatible. 
>
> Anyways. It would be nice to say something like that in the documentation. 
> (Maybe I have just missed it and it is there already.)
> "
> @richcmp_method simply allows to define just 
> one comparison method __richcmp__ instead of six __eq__, __lt__, ... "
> "
> and add a reference to some working example somewhere in the sage library.
> As many people will come across that file who are not programmers and do 
> not speak cython.
> And in future they will also not know about the __cmp__ method of python 
> 2.7
>
> In Python, those are called rich comparisons and returning NotImplemented 
is a Python thing for rich comparisons, including in things like __eq__. So 
it doesn't have to do with speaking Cython. IMO, anytime you want to find 
an example in the Sage library, grep is your friend and is more robust than 
in some place in the documentation that could (quickly) go out of date. 
However, I agree with you that the documentation could be improved by 
stating about returning NotImplemented and having a more complete example.

Best,
Travis

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-17 Thread Simon Brandhorst
I got that now. But at the time I thought __richcmp__ was just a fancy new 
name for the old __cmp__ in python in order to make it python 3 compatible. 

Anyways. It would be nice to say something like that in the documentation. 
(Maybe I have just missed it and it is there already.)
"
@richcmp_method simply allows to define just 
one comparison method __richcmp__ instead of six __eq__, __lt__, ... "
"
and add a reference to some working example somewhere in the sage library.
As many people will come across that file who are not programmers and do 
not speak cython.
And in future they will also not know about the __cmp__ method of python 2.7

On Tuesday, October 17, 2017 at 2:11:09 PM UTC+2, Jeroen Demeyer wrote:
>
> On 2017-10-17 12:13, Simon Brandhorst wrote: 
> > Because the documentation did not tell me it was possible: 
>
> That *what* is possible? @richcmp_method simply allows to define just 
> one comparison method __richcmp__ instead of six __eq__, __lt__, ... 
>
> However, the functionality of what that comparison method can do remains 
> the same. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-17 Thread Jeroen Demeyer

On 2017-10-17 12:13, Simon Brandhorst wrote:

Because the documentation did not tell me it was possible:


That *what* is possible? @richcmp_method simply allows to define just 
one comparison method __richcmp__ instead of six __eq__, __lt__, ...


However, the functionality of what that comparison method can do remains 
the same.


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-17 Thread Daniel Krenn
On 2017-10-17 12:13, Simon Brandhorst wrote:
> Because the documentation did not tell me it was possible:

Maybe sage.structure.richcmp.richcmp_by_eq_and_lt is something for you
(see also L1100 in sage/rings/asymptotic/growth_group.py).

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-17 Thread Simon Brandhorst
Because the documentation did not tell me it was possible:

http://doc.sagemath.org/html/en/reference/structure/sage/structure/richcmp.html
Can you update it?

I have interpreted it as a way to go to python3 without changing the logic 
of the code.


On Monday, October 16, 2017 at 6:13:29 PM UTC+2, Travis Scrimshaw wrote:
>
> Now the question is why are you doing this? You have rich comparison 
> behavior (i.e., a partial order) by allowing a return value of 
> NotImplemented. So I do not understand why you would do this because it 
> comes with a lot of boilerplate code and documentation unless you want to 
> remove all use of inequality comparisons. Yet, I do not think that is what 
> you are going to do.
>
> Best,
> Travis
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-16 Thread Travis Scrimshaw
Now the question is why are you doing this? You have rich comparison 
behavior (i.e., a partial order) by allowing a return value of 
NotImplemented. So I do not understand why you would do this because it 
comes with a lot of boilerplate code and documentation unless you want to 
remove all use of inequality comparisons. Yet, I do not think that is what 
you are going to do.

Best,
Travis

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-16 Thread Simon Brandhorst
It works. Thank you :-).

On Monday, October 16, 2017 at 2:28:00 PM UTC+2, Jeroen Demeyer wrote:
>
> Remove the @richcmp_method decorator. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] How do I overwrite comparison for modules?

2017-10-16 Thread Jeroen Demeyer

Remove the @richcmp_method decorator.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.