-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Allow functools.reduce
s 'initial' to be a keyword argument
#125916
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
Labels
Comments
See also #121677 |
skirpichev
added a commit
to skirpichev/cpython
that referenced
this issue
Oct 26, 2024
erlend-aasland
pushed a commit
that referenced
this issue
Nov 1, 2024
erlend-aasland
pushed a commit
that referenced
this issue
Nov 12, 2024
picnixz
pushed a commit
to picnixz/cpython
that referenced
this issue
Dec 8, 2024
picnixz
pushed a commit
to picnixz/cpython
that referenced
this issue
Dec 8, 2024
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature or enhancement
Proposal:
functools.reduce
takesfunction
(generally a callable) anditerable
, with an optionalinitial
parameter:https://docs.python.org/3/library/functools.html#functools.reduce
However,
initial
cannot be passed as a keyword argument, which reduces ;) readability,Allowing
initial
as keyword argument will be more clear, andinitial
could also be passed as a keyword argument while makingpartial
functions out ofreduce
.Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/remove-positional-only-restriction-on-initial-parameter-of-reduce/68897
Linked PRs
The text was updated successfully, but these errors were encountered: