On 2016-12-15 10:23, Marc Mezzarobba wrote:
Travis Scrimshaw wrote:
We need to be very careful about defining "not knowing". I (stongly)
believe when the objects/types are incomparable (say the rings ZZ and
QQ), then == should return False and != should return True.
Subsequently, when there is no coercion between the parents, they
should not raise an error.
Does anyone else have comments on this issue? Specifically, what should
x != y do in your opinion when
- x is a Sage Element,
- y is
(i) another Element, or
(ii) a non-Element that does not implement rich comparison
with Elements,
- and the coercion framework finds no common parent for x and y?
The main options are to:
(a) return True,
(b) raise a TypeError.
Don't forget the option
(c) return NotImplemented
I would say:
Case (i): (b)
Case (ii): (c)
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.