1. 18 Jan, 2001 2 commits
    • Guido van Rossum's avatar
      Rich comparisons: · b932420c
      Guido van Rossum authored
      - Use PyObject_RichCompareBool() when comparing keys; this makes the
        error handling cleaner.
      
      - There were two implementations for dictionary comparison, an old one
        (#ifdef'ed out) and a new one.  Got rid of the old one, which was
        abandoned years ago.
      
      - In the characterize() function, part of dictionary comparison, use
        PyObject_RichCompareBool() to compare keys and values instead.  But
        continue to use PyObject_Compare() for comparing the final
        (deciding) elements.
      
      - Align the comments in the type struct initializer.
      
      Note: I don't implement rich comparison for dictionaries -- there
      doesn't seem to be much to be gained.  (The existing comparison
      already decides that shorter dicts are always smaller than longer
      dicts.)
      b932420c
    • Guido van Rossum's avatar
      Same treatment as listobject.c: · f77bc62e
      Guido van Rossum authored
      - tuplecontains(): call RichCompare(Py_EQ).
      
      - Get rid of tuplecompare(), in favor of new tuplerichcompare() (a
        clone of list_compare()).
      
      - Aligned the comments for large struct initializers.
      f77bc62e
  2. 17 Jan, 2001 38 commits