David Beazley added the comment:
To me, the fact that m = max(s) if s else default doesn't work with iterators
alone makes this worthy of consideration.
I would also note that min/max are the only reduction functions that don't have
the ability to work with a possibly empty sequence. For example:
>>> sum([])
0
>>> any([])
False
>>> all([])
True
>>> functools.reduce(lambda x,y: x+y, [], 0)
0
>>> math.fsum([])
0.0
>>>
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18111>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com