GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — gh-94808: cover `PyFunction_GetDefaults` and `PyFunction_SetDefaults` by sobolevn · Pull Request #98449 · python/cpython Conversation
|
|
There's a difference with static PyObject * func_get_defaults(PyFunctionObject *op, void *Py_UNUSED(ignored)) { if (PySys_Audit("object.__getattr__", "Os", op, "__defaults__") < 0) { return NULL; } if (op->func_defaults == NULL) { Py_RETURN_NONE; } Py_INCREF(op->func_defaults); return op->func_defaults; } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| { | ||
| PyObject *defaults = PyFunction_GetDefaults(func); | ||
| if (defaults != NULL) { | ||
| Py_INCREF(defaults); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is correct because PyFunction_GetDefaults returns a borrowed ref.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @sobolevn for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @sobolevn for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @sobolevn and @JelleZijlstra, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry @sobolevn and @JelleZijlstra, I had trouble checking out the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @sobolevn for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @sobolevn and @JelleZijlstra, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.