Julian Berman added the comment:

It's not exactly the same of course, but calling next on a thing that might be 
empty would be somewhat close, and also is replacing an exception with a 
sentinel (an exception that is much easier to differentiate).

You can always get a ValueError out of min/max, they're going to be ultimately 
calling __lt__ on stuff which can do what it wants, but that's admittedly quite 
unlikely.

It's not really that readable though on the other hand.

----------

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

Reply via email to