[Python-Dev] python 3 niggle: None < 1 raises TypeError
tjreedy at udel.edu
Fri Feb 14 23:10:36 CET 2014
The idea of top and bottom objects, by whatever name, has be proposed,
discussed, and rejected on python-ideas list (which is where this
discussion really belongs if continued).
On 2/14/2014 4:41 PM, Chris Angelico wrote:
>> (though it could get a bit tricky -- what would AlwaysGreater > float('inf")
>> evaluate to?
> It'd be true. AlwaysGreater is greater than infinity. It is greater
> than float("nan"). It is greater than the entire concept of floating
> point. It is greater than everything imaginable... except for a nice
> MLT - a mutton, lettuce, and tomato sandwich... oh.
> Where things get tricky is when you compare two AlwaysGreater objects.
> Or even compare one against itself. It has to be greater.
equal, and less than itself. Or not, depending on exactly how the
methods are defined and coded. Which, as I remember, is part of why the
idea of a *generic* class was rejected. Real cases are better served by
custom classes that meet the custom need.
Terry Jan Reedy
More information about the Python-Dev