[Python-ideas] Smallest/Largest singletons

George Sakkis george.sakkis at gmail.com
Mon Nov 10 17:46:49 CET 2008


One small side-effect of not being able to compare incompatible types in 3.0
is that None cannot be used any more as the smallest element. Yes this has
always been an implementation artifact and a hack, but it was very
convenient none the less. Is it maybe the right time to add a builtin
Smallest (and also Largest) object, i.e. two singletons so that `Smallest <
x` for every x: x is not Smallest and `Largest > x` for every x: x is not
Largest ? Although it's not hard to define them in pure Python and one could
object with "not every n-liner needs to be a builtin", the main added value
is that these will be endorsed as the standard, otherwise we risk
mymodule.Smallest clashing with with yourmodule.Smallest.

George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20081110/4d760513/attachment.html>


More information about the Python-ideas mailing list