Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-102595: DocumentPyObject_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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
miss-islington merged 3 commits intopython:mainfromsobolevn:issue-102595
Mar 21, 2023

Conversation

sobolevn
Copy link
Member

@sobolevnsobolevn commentedMar 11, 2023
edited by miss-islington
Loading

@sobolevn
Copy link
MemberAuthor

@JelleZijlstra@AlexWaygood I don't know who else might take a look, github does not suggest anybody :)
Would you, please?

Copy link
Member

@JelleZijlstraJelleZijlstra left a 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.

AlexWaygood reacted with thumbs up emoji
@@ -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)

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.

Copy link
Member

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 usePyObject *x, though.

@AlexWaygood
Copy link
Member

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!

@JelleZijlstra
Copy link
Member

(though his GitHub status says he's ill right now 🙁).

I didn't notice that, sorry for pinging you Petr!

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@sobolevn
Copy link
MemberAuthor

Get well soon, Petr! :)

AlexWaygood reacted with thumbs up emoji

@encukou
Copy link
Member

Thanks for the wishes, and for the docs!
IMO, this definitely should be documented.

@miss-islingtonmiss-islington merged commit910a64e intopython:mainMar 21, 2023
@miss-islington
Copy link
Contributor

Thanks@sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks@sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-102878 is a backport of this pull request to the3.10 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.10only security fixes labelMar 21, 2023
@bedevere-bot
Copy link

GH-102879 is a backport of this pull request to the3.11 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.11only security fixes labelMar 21, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 21, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 21, 2023
miss-islington added a commit that referenced this pull requestMar 22, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JelleZijlstraJelleZijlstraJelleZijlstra approved these changes

@encukouencukouencukou approved these changes

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@sobolevn@AlexWaygood@JelleZijlstra@encukou@miss-islington@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp