Re: .title() - annoying mistake

2021-03-19 Thread Abdur-Rahmaan Janhangeer
Greetings, Missing the 'S renders in my opinion the method unfit to be included in it's current form. It is a call to improve it if possible. We wonder why in the first place such a method exists. If indeed it intends to capitalise all first letters, putting others in lowercase, the ' is a too co

Re: .title() - annoying mistake

2021-03-19 Thread Cameron Simpson
On 19Mar2021 23:47, Abdur-Rahmaan Janhangeer wrote: >At least i'd expect what it pretends to do >even if not following English. > >Missing ' is a weird behaviour, i get it >they skipped every non lettet I think the lesson here is that .title() doesn't even do English language title capitalisatio

Re: .title() - annoying mistake

2021-03-19 Thread Terry Reedy
On 3/19/2021 6:17 PM, Thomas Jollans wrote: From a quick scan of my (medium-sized) bookshelf, most publishers seem to agree that the thing to do is set the title in all caps. In my quick perusal, this is more true of 'popular' works, whereas 'academic' work are more likely to use titlecase.

Re: .title() - annoying mistake

2021-03-19 Thread Alan Gauld via Python-list
On 19/03/2021 19:58, Dan Stromberg wrote: > In high school, I was taught that English has multiple capitalization > rulesets to choose among for titles. > And, of course, there are multiple forms of English. English English is very different from US English. And even in the UK there are (a few,

Re: .title() - annoying mistake

2021-03-19 Thread Chris Angelico
On Sat, Mar 20, 2021 at 9:19 AM Thomas Jollans wrote: > From a quick scan of my (medium-sized) bookshelf, most publishers seem > to agree that the thing to do is set the title in all caps. The rule also applies to mentions of titles in the middles of sentences, such as if I were to refer to "Ali

Re: .title() - annoying mistake

2021-03-19 Thread Thomas Jollans
On 19/03/2021 20:33, dn via Python-list wrote: On 20/03/2021 07.49, Grant Edwards wrote: On 2021-03-19, MRAB wrote: 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 the

Re: .title() - annoying mistake

2021-03-19 Thread dn via Python-list
On 20/03/2021 06.17, Chris Angelico wrote: > On Sat, Mar 20, 2021 at 4:01 AM Abdur-Rahmaan Janhangeer > wrote: >> >> It's about unnecessary capitalisation for a common use case >> in English. >> >> You can see it in action on my site: >> https://www.compileralchemy.com/#articles >> >> see 24. >> >

Re: .title() - annoying mistake

2021-03-19 Thread Dan Stromberg
On Fri, Mar 19, 2021 at 11:51 AM Grant Edwards wrote: > On 2021-03-19, MRAB 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 >

Re: .title() - annoying mistake

2021-03-19 Thread Abdur-Rahmaan Janhangeer
At least i'd expect what it pretends to do even if not following English. Missing ' is a weird behaviour, i get it they skipped every non lettet On Fri, 19 Mar 2021, 22:50 Grant Edwards, wrote: > > In English, certain words are not capitalized in titles unless they're > the first word in the t

Re: .title() - annoying mistake

2021-03-19 Thread Mats Wichmann
On 3/19/21 12:49 PM, Grant Edwards wrote: On 2021-03-19, MRAB 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-depend

Re: .title() - annoying mistake

2021-03-19 Thread dn via Python-list
On 20/03/2021 07.49, Grant Edwards wrote: > On 2021-03-19, MRAB wrote: >> 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 (sh

Re: .title() - annoying mistake

2021-03-19 Thread Grant Edwards
On 2021-03-19, MRAB 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 wo

RE: .title() - annoying mistake

2021-03-19 Thread Schachner, Joseph
I agree. If the documentation notes this issue, and the (possibly new) Python user has to replace the .title() with a different function that uses regular expression and a lambda function to work around the issue, then perhaps it's time for a proposal to address this. Perhaps there needs to be

Re: .title() - annoying mistake

2021-03-19 Thread Abdur-Rahmaan Janhangeer
On Fri, 19 Mar 2021, 22:07 MRAB, wrote: > You want English "man's" to become "Man's", but French "l'homme" to > become "L'Homme". It's language-dependant. > Ah depends on a language (English i guess). Thanks > -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-19 Thread MRAB
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. -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-19 Thread Chris Angelico
On Sat, Mar 20, 2021 at 4:46 AM Karen Shaeffer via Python-list wrote: > > > > > On Mar 19, 2021, at 9:42 AM, Grant Edwards > > wrote: > > > > On 2021-03-19, Skip Montanaro wrote: > >>> > >>> That's annoying. You have to roll your own solution! > >>> > >> > >> Certainly seems like a known issue:

Re: .title() - annoying mistake

2021-03-19 Thread Karen Shaeffer via Python-list
> On Mar 19, 2021, at 9:42 AM, Grant Edwards wrote: > > On 2021-03-19, Skip Montanaro wrote: >>> >>> That's annoying. You have to roll your own solution! >>> >> >> Certainly seems like a known issue: >> >> https://bugs.python.org/issue12737 > > While that is an issue with string.title(),

Re: .title() - annoying mistake

2021-03-19 Thread Abdur-Rahmaan Janhangeer
Aie sorry, Did not know it targetted the non-english speakers. Kind Regards, Abdur-Rahmaan Janhangeer about | blog github Mauritius -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-19 Thread Chris Angelico
On Sat, Mar 20, 2021 at 4:01 AM Abdur-Rahmaan Janhangeer wrote: > > It's about unnecessary capitalisation for a common use case > in English. > > You can see it in action on my site: > https://www.compileralchemy.com/#articles > > see 24. > If you want something that's designed for English, get s

Re: .title() - annoying mistake

2021-03-19 Thread Abdur-Rahmaan Janhangeer
It's about unnecessary capitalisation for a common use case in English. You can see it in action on my site: https://www.compileralchemy.com/#articles see 24. Kind Regards, Abdur-Rahmaan Janhangeer about | blog github

Re: .title() - annoying mistake

2021-03-19 Thread Grant Edwards
On 2021-03-19, Skip Montanaro wrote: >> >> That's annoying. You have to roll your own solution! >> > > Certainly seems like a known issue: > > https://bugs.python.org/issue12737 While that is an issue with string.title(), I don't see how it's related to what the OP is reporting. Issue 12737 is ab

Re: .title() - annoying mistake

2021-03-19 Thread Skip Montanaro
> > That's annoying. You have to roll your own solution! > Certainly seems like a known issue: https://bugs.python.org/issue12737 That issue was opened in 2011. Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-19 Thread Abdur-Rahmaan Janhangeer
Thanks very much! That's annoying. You have to roll your own solution! Kind Regards, Abdur-Rahmaan Janhangeer about | blog github Mauritius > -- https://mail.python.org/mailman/listinfo/pyt

Re: .title() - annoying mistake

2021-03-19 Thread Paul Bryan
From https://docs.python.org/3.9/library/stdtypes.html#str.title: > The algorithm uses a simple language-independent definition of a word > as groups of consecutive letters. The definition works in many > contexts but it means that apostrophes in contractions and > possessives form word boundaries

.title() - annoying mistake

2021-03-19 Thread Abdur-Rahmaan Janhangeer
Greetings list, See this: >>> "Python's usage".title() "Python'S Usage" It should have been Python's Usage Why capitalise the S? Kind Regards, Abdur-Rahmaan Janhangeer about | blog github