-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-38237: Fix "versionchanged" for pow named arguments #19042
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
bpo-38237: Fix "versionchanged" for pow named arguments #19042
Conversation
The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9. See https://bugs.python.org/issue38237
Thanks Mark! Looks like the backport to 3.8 was added after my original PR so this got missed. Should https://github.com/python/cpython/blob/master/Doc/whatsnew/3.8.rst be updated as well? Probably an entry near the:
and
updated to divmod to match the original PR? |
It should, but it looks as though there isn't good agreement on the issue about how. So we may as well get this uncontroversial fix in, and then make a follow-up PR once we've decided what to do about the what's new document. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; I locally confirmed that kwarg support for pow()
was indeed added in 3.8.
Python 3.8.2 (default, Feb 26 2020, 22:21:03)
[GCC 9.2.1 20200130] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> pow(base=2, exp=10)
1024
Python 3.7.7+ (heads/3.7:4e3a7f9205, Mar 19 2020, 00:23:06)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> pow(base=2, exp=10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: pow() takes no keyword arguments
Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9. See https://bugs.python.org/issue38237 (cherry picked from commit c691f20) Co-authored-by: Mark Dickinson <[email protected]>
GH-19079 is a backport of this pull request to the 3.8 branch. |
@ammaraskar @aeros Thanks. I'll aim to find some time this weekend to look at the "what's new" part of the issue (though if someone else gets there first, even better!). |
The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9. See https://bugs.python.org/issue38237 (cherry picked from commit c691f20) Co-authored-by: Mark Dickinson <[email protected]>
The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9.
https://bugs.python.org/issue38237