Skip to content

Conversation

cbkinase
Copy link

@cbkinase cbkinase commented Oct 19, 2025

The glossary currently states:

“the str.lower() method can serve as a key function for case-insensitive sorts.”

I believe this should be updated to use str.casefold() instead. str.casefold() is recommended for case-insensitive matching in Unicode, and it provides more accurate behavior across languages than str.lower(). This also aligns with the "Sorting Techniques" section of the docs, which uses str.casefold() as the key function for case-insensitive sorting.


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

…str.lower

The glossary currently states:

“the str.lower() method can serve as a key function for case-insensitive sorts.”

I believe this should be updated to use str.casefold() instead.
str.casefold() is recommended for case-insensitive matching in Unicode, and it provides more accurate behavior across languages than str.lower(). This also aligns with the "Sorting Techniques" section of the docs, which uses str.casefold() as the key function for case-insensitive sorting.
@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news labels Oct 19, 2025
@python-cla-bot
Copy link

python-cla-bot bot commented Oct 19, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants