1. 18 Jan, 2001 3 commits
    • Guido van Rossum's avatar
      Same treatment as listobject.c: · 9d19cb8a
      Guido van Rossum authored
      - In count(), remove(), index(): call RichCompare(Py_EQ).
      
      - Get rid of array_compare(), in favor of new array_richcompare() (a
        near clone of list_compare()).
      
      - Aligned items in array_methods initializer and comments for type
        struct initializer.
      
      - Folded a few long lines.
      9d19cb8a
    • 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 37 commits