Skip to content

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

Open
adorilson wants to merge 2 commits intopython:mainfrom
adorilson:106318.lower
Open

gh-106318: Improve str.lower() docs#144848
adorilson wants to merge 2 commits intopython:mainfrom
adorilson:106318.lower

Conversation

@adorilson
Copy link
Contributor

@adorilson adorilson commented Feb 15, 2026

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/


Note that ``s.lower().islower()`` might be ``False`` if ``s``
contains uncased characters or if the Unicode category of the resulting
character(s) is not "Lu" (Letter, uppercase), but e.g. "Lt" (Letter,
Copy link
Member

Choose a reason for hiding this comment

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

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
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
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
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
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.

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

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants