Skip to content

Conversation

@adorilson
Copy link
Contributor

@adorilson adorilson commented Dec 1, 2025

WIP to #106318

gh-106318: Add examples for str.casefold() and str.lower() methods


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

lowercase letter ``'ß'`` is equivalent to ``"ss"``. Since it is already
lowercase, :meth:`lower` would do nothing to ``'ß'``; :meth:`casefold`
converts it to ``"ss"``.
converts it to ``"ss"``, as follows:
Copy link
Member

Choose a reason for hiding this comment

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

I find this is a little repetitive, if one reads the sentence the example just repeats the exact same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What if we remove the sentence and put comments?

>>> 'ß'.casefold() # the German lowercase letter ``'ß'``
'ss'
>>> 'ß'.lower() # since it is already lowercase, lower does nothing
'ß'

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