.title() - annoying mistake
Benjamin Schollnick
bschollnick at schollnick.net
Sun Mar 21 14:39:04 EDT 2021
> I agree with everything you say. Especially the open source part. But wouldn't
> you agree that .title() with all its arbitrary specificity to appear in the
> very core of a general purpose language is quite an oddity?
No, because it book ends the issue.
Upper - Converts everything to uppercase
Lower - Converts everything to lowercase
Title - Covers the cases in-between upper/lower.
I’ll agree that if title was to respect language definitions, that there would be a problem here… But it specifically states otherwise.
And as I mentioned the sheer amount of work that would be needed would probably cover a phd dissertation or more… It’s a huge problem set to respect one language, let alone all languages.
So the only answer is to not respect the languages, and leave that up to a later implementation or for someone else to assist in adding in support.
Heck, how do we prevent it from titlecasing abbreviations? (This is plain text not XML…. If it was XML it would be easy!)
- Benjamin
More information about the Python-list
mailing list