• Guido van Rossum's avatar
    Convert to rich comparisons: · 65e1cea6
    Guido van Rossum yazdı
    - sort's docompare() calls RichCompare(Py_LT).
    
    - list_contains(), list_index(), listcount(), listremove() call
      RichCompare(Py_EQ).
    
    - Get rid of list_compare(), in favor of new list_richcompare().  The
      latter does some nice shortcuts, like when == or != is requested, it
      first compares the lengths for trivial accept/reject.  Then it goes
      over the items until it finds an index where the items differe; then
      it does more shortcut magic to minimize the number of additional
      comparisons.
    
    - Aligned the comments for large struct initializers.
    65e1cea6
listobject.c 40.5 KB