]> granicus.if.org Git - python/commit
Rich comparisons.
authorGuido van Rossum <guido@python.org>
Wed, 17 Jan 2001 15:28:20 +0000 (15:28 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 17 Jan 2001 15:28:20 +0000 (15:28 +0000)
commit8998b4f691db9bf1efcdd1fd496aaea64200a957
tree18755b2e10c1166605a8c66a1c90059b1430d7c6
parentb226b0c07840d55e91e549deea91d95cdf32c624
Rich comparisons.

- Got rid of instance_cmp(); refactored instance_compare().

- Added instance_richcompare() which calls __lt__() etc.

Some unrelated stuff mixed in:

- Aligned comments in various large struct initializers.

- Better test to avoid recursion if __coerce__ returns self as the
  first argument (this is an unrelated fix by Neil Schemenauer!).

- Style nit: don't use Py_DECREF(Py_NotImplemented); use
  Py_DECREF(result) -- it just looks better. :-)
Objects/classobject.c