.title() - annoying mistake

Chris Angelico rosuav at gmail.com
Mon Mar 22 10:03:27 EDT 2021


On Tue, Mar 23, 2021 at 1:01 AM Robert Latest via Python-list
<python-list at python.org> wrote:
> I don't mind .title() being in Python. I would very much mind to be the person
> in charge of maintaining it and having to port it into new versions of Python,
> always keeping an eye on the evolution of Unicode or other standards (see
> above).
>
> It probably just comes down to me not being able to conjure up a single
> sensible use case for .title() as well as the whole concept of "title casing"
> in the context of a programming language.
>
> > The neat thing about Unicode is
>
> [many things]
>
> > The documentation sometimes shorthands things with terms like "upper
> > case" and "lower case", but that's partly because being pedantically
> > correct in a docstring doesn't actually help anything, and the code
> > itself IS correct.
>
> ...but hard to maintain and useless. I just love to hate .title() ;-)
>

Cool thing is, nobody in Python needs to maintain anything here. It's
all built on top of the published Unicode data files. It's simply a
matter of updating to the latest version of the Unicode standard! :)

ChrisA


More information about the Python-list mailing list