1. 10 Feb, 2003 28 commits
  2. 09 Feb, 2003 7 commits
  3. 08 Feb, 2003 4 commits
  4. 07 Feb, 2003 1 commit
    • Tim Peters's avatar
      Comparison for timedelta, time, date and datetime objects: __eq__ and · 07534a60
      Tim Peters authored
      __ne__ no longer complain if they don't know how to compare to the other
      thing.  If no meaningful way to compare is known, saying "not equal" is
      sensible.  This allows things like
      
          if adatetime in some_sequence:
      and
          somedict[adatetime] = whatever
      
      to work as expected even if some_sequence contains non-datetime objects,
      or somedict non-datetime keys, because they only call __eq__.
      
      It still complains (raises TypeError) for mixed-type comparisons in
      contexts that require a total ordering, such as list.sort(), use as a
      key in a BTree-based data structure, and cmp().
      07534a60