◐ Shell
clean mode source ↗

gh-141004: Document `PyFunction_SetKwDefaults` by ZeroIntensity · Pull Request #141294 · python/cpython

StanFromIreland

StanFromIreland

Comment on lines +107 to +108

Set the keyword-only argument default values of the function object *op*.
*defaults* must be a dictionary of keyword-only arguments or ``Py_None``.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set the keyword-only argument default values of the function object *op*.
*defaults* must be a dictionary of keyword-only arguments or ``Py_None``.
Set the keyword-only parameter default values of the function object *op*.
*defaults* must be a dictionary of keyword-only parameters or ``Py_None``.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We say "argument" everywhere else in this file, so I'd rather not deviate from it here. I don't think that the distinction is particularly helpful for readers here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of such a precedent, but unfortunately it is. Fixing this is tracked in #133438.

StanFromIreland

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miss-islington-app

Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Nov 9, 2025
(cherry picked from commit 18529b5)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

@bedevere-app

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Nov 9, 2025
(cherry picked from commit 18529b5)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>

@bedevere-app

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request

Dec 6, 2025