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.

Sorry, I don't understand your example: I think everyone agrees that
ZZ == QQ should be False, but many people think that ZZ(1) == QQ(1)
should be True (though I personally disagree), and my post only was
about Elements.

> Subsequently, when there is no coercion between the parents, they
> should not raise an error.

Regarding ==, I believe it is a matter of convenience and consistency.
Raising an error makes it easier to catch bugs, while returning False
when there is no coercion allows things like [a for a in [1, "banana"]
if a == 1].

Regarding !=, I am less convinced. Returning True would imply that the
objects are known to be different (as opposed to: not known to be
equal, in the case of ==), while the coercion may not be implemented
but otherwise make perfect sense.

And in any case, I don't see what else than raising an error we could do
in the case of <, <=, >, >=.

-- 
Marc

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

Reply via email to