Skip to content

Docs: standardize boolean constants in stdtypes.rst - #133325

Merged
serhiy-storchaka merged 6 commits into
python:mainfrom
Yzi-Li:standardize-bool-in-doc
May 9, 2025
Merged

Docs: standardize boolean constants in stdtypes.rst#133325
serhiy-storchaka merged 6 commits into
python:mainfrom
Yzi-Li:standardize-bool-in-doc

Conversation

@Yzi-Li

@Yzi-LiYzi-Li commented May 3, 2025

Copy link
Copy Markdown
Contributor

Replaces lowercase true/false with standard boolean values True/False.


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

Comment threadDoc/library/stdtypes.rst
@skirpichev

Copy link
Copy Markdown
Member

@Yzi-Li, please avoid using "Update branch" button, unless you do something meaningful, e.g. fix a merge conflict.

@Yzi-Li

Copy link
Copy Markdown
ContributorAuthor

Sorry, but I just want to revert the commit.

@serhiy-storchakaserhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are similar cases for is_valid() in Doc/library/string.rst and filter() in Doc/library/logging.rst. Do you mind to fix them too?

@Yzi-Li

Copy link
Copy Markdown
ContributorAuthor

Do you mind to fix them too?

I'd like to do.

@Yzi-Li
Yzi-Li requested a review from vsajip as a code ownerMay 9, 2025 10:44
@hugovkhugovk added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 9, 2025
Comment threadDoc/library/logging.rst Outdated
Comment threadDoc/library/string.rst Outdated
@Yzi-Li

Copy link
Copy Markdown
ContributorAuthor

base64.b85encode() has a boolean parameter pad. In the description of this function, we used "If pad is true". But pad here is a boolean, it must be True or False. And in other descriptions like b64decode(), we used "If valiadate is True".

Should we use True to standardize them?

@serhiy-storchaka

Copy link
Copy Markdown
Member

No, we should not use this for parameters, because arguments can also be 1, 0, None, etc.

@serhiy-storchakaserhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

@serhiy-storchaka
serhiy-storchaka merged commit 076004a into python:mainMay 9, 2025
@github-project-automationgithub-project-automationBot moved this from Todo to Done in Docs PRsMay 9, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @Yzi-Li for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2025
)
(cherry picked from commit 076004a)
Co-authored-by: Yongzi Li <1538321957@qq.com>
@bedevere-app

Copy link
Copy Markdown

GH-133760 is a backport of this pull request to the 3.14 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2025
)
(cherry picked from commit 076004a)
Co-authored-by: Yongzi Li <1538321957@qq.com>
@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label May 9, 2025
@bedevere-app

Copy link
Copy Markdown

GH-133761 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label May 9, 2025
@Yzi-Li
Yzi-Li deleted the standardize-bool-in-doc branch May 9, 2025 14:13
@serhiy-storchaka

Copy link
Copy Markdown
Member

Thank you for your contribution, @Yzi-Li.

serhiy-storchaka pushed a commit that referenced this pull request May 9, 2025
…3325) (GH-133760)
(cherry picked from commit 076004a)
Co-authored-by: Yongzi Li <1538321957@qq.com>
serhiy-storchaka pushed a commit that referenced this pull request May 9, 2025
…3325) (GH-133761)
(cherry picked from commit 076004a)
Co-authored-by: Yongzi Li <1538321957@qq.com>
@Yzi-Li

Copy link
Copy Markdown
ContributorAuthor

I'm glad I could contribute in this way. 😄

Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip issueskip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants

@Yzi-Li@skirpichev@serhiy-storchaka@StanFromIreland@hugovk@ZeroIntensity