-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-141004: Document PyFunction_SetKwDefaults
#141294
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -102,6 +102,15 @@ There are a few functions specific to Python functions. | |||||||||
| dictionary of arguments or ``NULL``. | ||||||||||
|
|
||||||||||
|
|
||||||||||
| .. c:function:: int PyFunction_SetKwDefaults(PyObject *op, PyObject *defaults) | ||||||||||
|
|
||||||||||
| Set the keyword-only argument default values of the function object *op*. | ||||||||||
| *defaults* must be a dictionary of keyword-only arguments or ``Py_None``. | ||||||||||
|
Comment on lines
+107
to
+108
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||||||
|
|
||||||||||
ZeroIntensity marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| This function returns ``0`` on success, and returns ``-1`` with an exception | ||||||||||
| set on failure. | ||||||||||
|
|
||||||||||
|
|
||||||||||
| .. c:function:: PyObject* PyFunction_GetClosure(PyObject *op) | ||||||||||
|
|
||||||||||
| Return the closure associated with the function object *op*. This can be ``NULL`` | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.