On 3/19/21 12:49 PM, Grant Edwards wrote:
On 2021-03-19, MRAB <pyt...@mrabarnett.plus.com> wrote:
On 2021-03-19 17:19, Abdur-Rahmaan Janhangeer wrote:
Aie sorry,

Did not know it targetted the non-english speakers.

You want English "man's" to become "Man's", but French "l'homme" to
become "L'Homme". It's language-dependant.

In English, certain words are not capitalized in titles unless they're
the first word in the title (short articles and prepositions), and
.title() doesn't get that right either:

"the man in the grey flannel suit".title()
'The Man In The Grey Flannel Suit'

should be

'The Man in the Grey Flannel Suit'

The problem is that there isn't a standard for title case, which I understood to be specifically for English, following the rules that Grant mentions ("certain words are not capitalized"), but on looking it up it turns out that the various style guides (some of which we don't get to mention here without stirring up controversy) each have their own interpretations of what it is. And Python doesn't do any of those: Python does what is documented.

So possibly the choice to call it titlecase is the source of the confusion?
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to