Simeon Visser added the comment:

This doesn't happen in Python 3 as None can't be compared to other elements:

>>> min([1,2,3,None])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: NoneType() < int()

I can also imagine people now using min with the intended behaviour of "give me 
the smallest element, or None if it happens to be present".

----------
nosy: +simeon.visser

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22979>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to