[Python-ideas] adding a casefold() method to str
Benjamin Peterson
benjamin at python.org
Sun Jan 8 17:17:30 CET 2012
Hi,
Casefolding (Unicode Standard 3.13) is a more aggressive version of lowercasing.
It's purpose to assist in the implementation of caseless mapping. For example,
under lowercase "ß" -> "ß" but under casefolding "ß" -> "ss". I propose we add a
casefold() method. So, case-insensitive matching should really be
"one.casefold() == two.casefold()"
rather than "one.lower() == two.lower()".
Regards,
Benjamin
More information about the Python-ideas
mailing list