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

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to