You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct Glossary key function example to use str.casefold instead of 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.
0 commit comments