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-134946 docs: fix formatting in dataclasses.rst#134948

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

Conversation

alesolda
Copy link

@alesoldaalesolda commentedMay 30, 2025
edited
Loading

Correct boolean literals by replacing 'true' with 'True' for accuracy and consistency.

Fixesgh-134946


📚 Documentation preview 📚:https://cpython-previews--134948.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-botbot commentedMay 30, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-appbedevere-appbot added awaiting review docsDocumentation in the Doc dir skip news labelsMay 30, 2025
@alesoldaalesolda changed the titleDocs: fix formatting in dataclasses.rstgh-134946 docs: fix formatting in dataclasses.rstMay 30, 2025
@alesoldaalesoldaforce-pushed thegh-134946-doc-fix-format-dataclasses branch from9eb96a7 to7f75826CompareMay 30, 2025 18:31
@alesoldaalesolda marked this pull request as draftMay 30, 2025 18:36
@alesoldaalesoldaforce-pushed thegh-134946-doc-fix-format-dataclasses branch 4 times, most recently from45ec776 to2d59921CompareMay 30, 2025 22:12
Correct boolean literals by replacing 'true' with '``True``' for accuracy and consistency.Resolvespythongh-134946
@alesoldaalesoldaforce-pushed thegh-134946-doc-fix-format-dataclasses branch from2d59921 to060dd93CompareMay 30, 2025 22:17
@alesoldaalesolda marked this pull request as ready for reviewMay 30, 2025 22:30
@Yzi-Li
Copy link
Contributor

There are similar cases on lines 117, 154 and 155. Would you mind fixing them too?

alesolda reacted with eyes emoji

@ericvsmithericvsmith self-assigned thisMay 31, 2025
@ericvsmith
Copy link
Member

The original intent was to differentiate betweenTrue (the singular value) and something that's "truthy" (that is, it evaluates toTrue in a boolean context. I'd like to avoid "If true (the default isTrue)", but I suppose it's more correct.

All of the ones that were changed to "IfTrue (the default isFalse)" should instead be left alone. "If true (the default isFalse)" is correct.

Yzi-Li reacted with thumbs up emoji

@alesolda
Copy link
Author

Hi@ericvsmith 👋 , thanks for the clarification.

if I understood correctly, then there is only one occurrence to be changed:

unsafe_hash: IfFalse (the default)
to
unsafe_hash: If false (the default)

Is this correct?

@Yzi-Li
Copy link
Contributor

unsafe_hash: IfFalse (the default)

I think the correct change is: if false (the default isFalse). The default value ofunsafe_hash is booleanFalse. "false" means something that evaluates toFalse in a boolean context.

@Viicos
Copy link
Contributor

Note: I already have an open PR for this:#116532 (although not taking the same approach).

@ericvsmith
Copy link
Member

ericvsmith commentedJun 1, 2025
edited
Loading

Maybe they should all be rewritten so that they describe the behavior if the flag is set, not ever if the flag has a "falsy" value. Then at the end, put the default value. So they'd all become something like "If true, then <whatever>. The default value isTrue". Or "If true, then <whatever>. The default value isFalse." Or maybe omit the default values entirely, they're given immediately above.

At this point I suggest someone from the documentation group take a look, or just leave it as it is.

@AA-Turner
Copy link
Member

I don't this PR adds anything, would suggest closing.

A

alesolda reacted with thumbs up emoji

@AA-TurnerAA-Turner added the pendingThe issue will be closed if no feedback is provided labelJun 2, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@StanFromIrelandStanFromIrelandStanFromIreland left review comments

@ericvsmithericvsmithAwaiting requested review from ericvsmithericvsmith is a code owner

Assignees

@ericvsmithericvsmith

Labels
awaiting reviewdocsDocumentation in the Doc dirpendingThe issue will be closed if no feedback is providedskip news
Projects
Status: Todo
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Inconsistent format in dataclasses.rst
6 participants
@alesolda@Yzi-Li@ericvsmith@Viicos@AA-Turner@StanFromIreland

[8]ページ先頭

©2009-2025 Movatter.jp