This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients exarkun, rhettinger, therve
Date 2008-06-06.20:17:47
SpamBayes Score 0.005142702
Marked as misclassified No
Message-id <1212783470.98.0.0258583277018.issue3051@psf.upfronthosting.co.za>
In-reply-to
Content
I'll fix this to accommodate both cases, __lt__ and __le__. After 
trying x<y and finding the comparison isn't defined, it can try (not 
y<=x) instead.

Also, will document that either __cmp__ or all six rich comparisons 
should be defined for code that wants to run through sort, bisect, 
min/max, or heapq.  The rich comparison PEP is clear on this point, but 
I don't think the affirmative statement ever made it to main docs:

"The reflexivity rules *are* assumed by Python.  Thus, the
interpreter may swap y>x with x<y, y>=x with x<=y, and may swap
the arguments of x==y and x!=y."  -- PEP 207
History
Date User Action Args
2008-06-06 20:17:51rhettingersetspambayes_score: 0.0051427 -> 0.005142702
recipients: + rhettinger, exarkun, therve
2008-06-06 20:17:51rhettingersetspambayes_score: 0.0051427 -> 0.0051427
messageid: <1212783470.98.0.0258583277018.issue3051@psf.upfronthosting.co.za>
2008-06-06 20:17:49rhettingerlinkissue3051 messages
2008-06-06 20:17:48rhettingercreate