.title() - annoying mistake

Jon Ribbens jon+usenet at unequivocal.eu
Sat Mar 20 19:18:33 EDT 2021


On 2021-03-20, Cameron Simpson <cs at cskk.id.au> wrote:
> On 20Mar2021 12:53, Sibylle Koczian <nulla.epistola at web.de> wrote:
>>Am 20.03.2021 um 09:34 schrieb Alan Bawden:
>>>The real reason Python strings support a .title() method is surely
>>>because Unicode supports upper, lower, _and_ title case letters, and
>>>tells you how to map between them. [...]
>>>
>>But that's exactly what he's doing, with a result which is documented, 
>>but not really satisfactory.
>
> Not to mention that the .title method _predates_ Python's use of Unicode 
> in strings.

Well, it predates Python's use of Unicode in the default string type,
but not Python's use of Unicode in strings.

https://github.com/python/cpython/commit/4c08d554b9009899780a5e003d6bbeb5413906ee


More information about the Python-list mailing list