summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-18 00:39:02 (GMT)
committerGuido van Rossum <guido@python.org>2001-01-18 00:39:02 (GMT)
commitb932420cc7808862bc7e87dad7b44748f7735012 (patch)
treeedbdaef0014a1390ee250593ba68e85dfcfc45da /Modules
parentf77bc62e7351a052f2127221afa43bbf442d8c96 (diff)
downloadcpython-b932420cc7808862bc7e87dad7b44748f7735012.zip
cpython-b932420cc7808862bc7e87dad7b44748f7735012.tar.gz
cpython-b932420cc7808862bc7e87dad7b44748f7735012.tar.bz2
Rich comparisons:
- 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.)
Diffstat (limited to 'Modules')
0 files changed, 0 insertions, 0 deletions