Changes between Initial Version and Version 1 of Ticket #18251


Ignore:
Timestamp:
07/29/16 11:19:51 (6 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18251

    • Property Summary changed from Equality comparison with 0 is not consistant to CombinatorialFreeModule should use coercion for comparisons
  • Ticket #18251 – Description

    initial v1  
    66sage: C.zero() == QQ(0)
    77False
    8 sage: M.zero()
    9 (0, 0, 0, 0)
    10 sage: M.zero() == ZZ(0)
    11 True
    12 sage: M.zero() == QQ(0)
    13 False
    148}}}
    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?