.title() - annoying mistake

Albert-Jan Roskam sjeik_appie at hotmail.com
Sun Mar 21 08:19:00 EDT 2021


   On 20 Mar 2021 23:47, 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.

   ====
   This would be a good
   start: https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case
   It could be locale-dependent. What I also don't like about .title() is
   that it messes up abbreviations ("Oecd")


More information about the Python-list mailing list