Commit ff1c12a
authored
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.1 parent bedaea0 commit ff1c12a
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
816 | | - | |
| 816 | + | |
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| |||
0 commit comments