Message211168
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. |
|
Date |
User |
Action |
Args |
2014-02-13 20:08:49 | rhettinger | set | recipients:
+ rhettinger, docs@python |
2014-02-13 20:08:49 | rhettinger | set | messageid: <1392322129.66.0.847659571757.issue20620@psf.upfronthosting.co.za> |
2014-02-13 20:08:49 | rhettinger | link | issue20620 messages |
2014-02-13 20:08:49 | rhettinger | create | |
|