Changes between Initial Version and Version 1 of Ticket #18251
 Timestamp:
 07/29/16 11:19:51 (6 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #18251

Property
Summary
changed from
Equality comparison with 0 is not consistant
toCombinatorialFreeModule should use coercion for comparisons

Property
Summary
changed from

Ticket #18251 – Description
initial v1 6 6 sage: C.zero() == QQ(0) 7 7 False 8 sage: M.zero()9 (0, 0, 0, 0)10 sage: M.zero() == ZZ(0)11 True12 sage: M.zero() == QQ(0)13 False14 8 }}} 15 What I've been doing has been implementing a custom `__eq__` which checks explicitly for the other argument is 0 and then checking `self.is_zero`. However I'm thinking we should have a general fix with this as a special case, but we could do it just for these element classes.16 17 Additionally this works when there a coercion from the base ring. I guess more generally do we want equality checking for when there is a conversion to the base ring? Thoughts?