-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-102595: Document PyObject_Format
c-api function
#102596
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
Conversation
@JelleZijlstra @AlexWaygood I don't know who else might take a look, github does not suggest anybody :) |
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.
I can review the text, but going to request review from @encukou to confirm whether this should be documented, as I am not an expert on the C API.
@@ -179,6 +179,13 @@ Object Protocol | |||
If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` | |||
will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`. | |||
|
|||
.. c:function:: PyObject* PyObject_Format(PyObject *obj, PyObject *format_spec) |
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.
Weird that we're inconsistent in putting the space before or after the *
, but the next two functions do the same thing.
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.
The relevant style guide would be PEP 7, but it says nothing about this issue. All the examples use PyObject *x
, though.
I'm also not an expert on the C API, and also would have suggested @encukou as a reviewer for this one (though his GitHub status says he's ill right now 🙁). With @JelleZijlstra's suggestions, the wording looks good, though! |
I didn't notice that, sorry for pinging you Petr! |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Get well soon, Petr! :) |
Thanks for the wishes, and for the docs! |
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-102878 is a backport of this pull request to the 3.10 branch. |
GH-102879 is a backport of this pull request to the 3.11 branch. |
…102596) (cherry picked from commit 910a64e) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Def: https://github.com/python/cpython/blame/5ffdaf748d98da6065158534720f1996a45a0072/Include/abstract.hGH-L389
…102596) (cherry picked from commit 910a64e) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Def: https://github.com/python/cpython/blame/5ffdaf748d98da6065158534720f1996a45a0072/Include/abstract.hGH-L389
… (GH-102879) (cherry picked from commit 910a64e) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Def: https://github.com/python/cpython/blame/5ffdaf748d98da6065158534720f1996a45a0072/Include/abstract.hGH-L389 Automerge-Triggered-By: GH:encukou
(cherry picked from commit 910a64e) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Def: https://github.com/python/cpython/blame/5ffdaf748d98da6065158534720f1996a45a0072/Include/abstract.hGH-L389
Def: https://github.com/python/cpython/blame/5ffdaf748d98da6065158534720f1996a45a0072/Include/abstract.h#L389
PyObject_Format
c-api function is not documented #102595Automerge-Triggered-By: GH:encukou