Skip to content

gh-106318: Improve str.lower() docs - #144848

Merged
encukou merged 4 commits into
python:mainfrom
adorilson:106318.lower
Dec 2, 2026
Merged

encukou merged 4 commits into
python:mainfrom
adorilson:106318.lower

Conversation

@adorilson

@adorilson adorilson commented Feb 15, 2026 •

Copy link
Copy Markdown
Contributor

WIP #106318

This PR adds some details to str.lower() to make it similar to str.upper() proposed by #144638.


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

Comment thread Doc/library/stdtypes.rst Resolved
Comment thread Doc/builtins/stdtypes.rst Outdated
character(s) is not "Lu" (Letter, uppercase), but e.g. "Lt" (Letter,
titlecase).

For example, see the word "Python" written in Punjabi, the most spoken

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.

I don’t think the fact is particularly interesting nor helpful, I think it just unnecessarily extends the section.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you mean the whole adding or only the example?

The note paragraph was based on what already exists in the str.upper() docs. If this exists there, I think it makes sense exist here too.

The example I've suggested adds to str.upper() docs on #144638. I would prefer a more Occidental example, but I couldn't find one. I think examples are important.

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.

I was referring to specifically the "most spoken language in..." fact.

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.

I was referring to specifically the "most spoken language in..." fact.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, nice. I've put it because if I see only "written in Punjabi", I would think "wtf is Punjabi?". Of course, I would search about that, but I thought it could be ended here.

That being said, we can:

  1. Keep it (in case you change your mind)
  2. Reduce to "written in Punjabi, a language from Paskitan"
  3. Reduce more to "written in Punjabi"
  4. 3 + adding a link to the Punjabi Wikipedia entry.

What do you prefer?

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.

I'd prefer 3. It's clear that it's a language, and you can look it up in a dictionary to learn more.

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 6, 2026
@read-the-docs-community

read-the-docs-community Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
📖 150 files changed · 1 added · 149 modified

Preview · build overview · cpython-previews · built Dec. 2, 2026, 3:33 p.m. UTC

Comment thread Doc/builtins/stdtypes.rst Resolved
@encukou
encukou merged commit f9704be into python:main Dec 2, 2026
31 checks passed
@encukou encukou added awaiting review needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Dec 2, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Dec 2, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @adorilson for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @adorilson for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @adorilson and @encukou, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker f9704bedd09b961dac0d9485df0eaf53b8cdd6ee 3.14

@bedevere-app

bedevere-app Bot commented Dec 2, 2026

Copy link
Copy Markdown

GH-163022 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Dec 2, 2026
hugovk pushed a commit that referenced this pull request Dec 3, 2026
gh-106318: Improve str.lower() docs (GH-144848)
(cherry picked from commit f9704be)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
@bedevere-app

bedevere-app Bot commented Dec 3, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Dec 3, 2026
hugovk added a commit that referenced this pull request Dec 3, 2026
(cherry picked from commit f9704be)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news stale Stale PR or inactive for long period of time.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants