New submission from Raymond Hettinger:
There is a new "default" argument for min() and max():
>>> min([], default=10)
10
The new argument is not currently shown by help():
>>> help(min)
Help on built-in function min in module builtins:
min(...)
min(iterable[, key=func]) -> value
min(a, b, c, ...[, key=func]) -> value
With a single iterable argument, return its smallest item.
With two or more arguments, return the smallest argument.
----------
assignee: docs@python
components: Documentation
messages: 211168
nosy: docs@python, rhettinger
priority: normal
severity: normal
status: open
title: Update the min()/max() docs for the new default argument
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20620>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com