summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-17 22:11:59 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-17 22:11:59 (GMT)
commit65e1cea6e372ed809501cf5b927a65c111f79cd3 (patch)
treec1d623c8cc41e1dffca50c4db184812b24bf161c /Modules/mathmodule.c
parent7d6457743a2f48888dd10a41cee0e072fb4595ce (diff)
downloadcpython-65e1cea6e372ed809501cf5b927a65c111f79cd3.zip
cpython-65e1cea6e372ed809501cf5b927a65c111f79cd3.tar.gz
cpython-65e1cea6e372ed809501cf5b927a65c111f79cd3.tar.bz2
Convert to rich comparisons:
- 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.
Diffstat (limited to 'Modules/mathmodule.c')
0 files changed, 0 insertions, 0 deletions