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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4