Message317046
I expect these docs date back to when ints, longs, and floats were the only hashable language-supplied types for which mixed-type comparison could ever return True.
They could stand some updates ;-) `fractions.Fraction` and `decimal.Decimal` are more language-supplied numeric types that participate now, and the Boolean singletons are instances of (a subclass of) `int`. I think it would be good to point that out, especially the latter (in many other languages Booleans can't be compared to ints).
So +1 both to Mark's more-general explanation, and to explicitly naming more specific cases for illustration. |
|
Date |
User |
Action |
Args |
2018-05-18 18:29:27 | tim.peters | set | recipients:
+ tim.peters, terry.reedy, mark.dickinson, Janusz Harkot |
2018-05-18 18:29:27 | tim.peters | set | messageid: <1526668167.67.0.682650639539.issue33572@psf.upfronthosting.co.za> |
2018-05-18 18:29:27 | tim.peters | link | issue33572 messages |
2018-05-18 18:29:27 | tim.peters | create | |
|