New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the min()/max() docs for the new default argument #64819
Comments
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. |
Here's a patch to update the min() and max() documentations. |
key and default are keyword-only arguments, the signature should have a '*'. |
Updated patch adressing Larry's comment. I also fixed a typo in the max() documentation. Thanks! |
Rebased patch. |
New changeset b60258f4499c by Raymond Hettinger in branch '3.4': |
Thanks for the patch. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: