Re: .title() - annoying mistake

2021-03-22 Thread Gene Heskett
On Monday 22 March 2021 22:31:27 Richard Damon wrote: > On 3/22/21 4:20 PM, Christian Gollwitzer wrote: > > Am 22.03.21 um 16:03 schrieb Robert Latest: > >> Chris Angelico wrote: > >>> Cool thing is, nobody in Python needs to maintain anything here. > >> > >> That's great because I'm actually havi

Re: .title() - annoying mistake

2021-03-22 Thread Richard Damon
On 3/22/21 4:20 PM, Christian Gollwitzer wrote: > Am 22.03.21 um 16:03 schrieb Robert Latest: >> Chris Angelico wrote: >>> Cool thing is, nobody in Python needs to maintain anything here. >> >> That's great because I'm actually having trouble with sending log >> messages over >> the socket conectio

Re: .title() - annoying mistake

2021-03-22 Thread dn via Python-list
On 23/03/2021 10.00, Avi Gross via Python-list wrote: > Speaking for myself, I am beyond tired of this topic, however informative > parts have been. +1 > I will say it is irrational to try to impose rationally across all possible > languages, let alone people like me who often combine 3 or more

RE: .title() - annoying mistake

2021-03-22 Thread Avi Gross via Python-list
? -Original Message- From: Python-list On Behalf Of Christian Gollwitzer Sent: Monday, March 22, 2021 4:21 PM To: python-list@python.org Subject: Re: .title() - annoying mistake Am 22.03.21 um 16:03 schrieb Robert Latest: > Chris Angelico wrote: >> Cool thing is, nobody in Pyth

Re: .title() - annoying mistake

2021-03-22 Thread Christian Gollwitzer
Am 22.03.21 um 16:03 schrieb Robert Latest: Chris Angelico wrote: Cool thing is, nobody in Python needs to maintain anything here. That's great because I'm actually having trouble with sending log messages over the socket conection you helped me with, would you mind having a look? You misund

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Benjamin Schollnick wrote: > I’m sorry, but it’s as if he’s arguing for the sake of arguing. It’s > starting to feel very unproductive, and unnecessary. That was never five minutes just now! robert -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Chris Angelico
On Tue, Mar 23, 2021 at 5:16 AM Karen Shaeffer via Python-list wrote: > > Hi Chris, > Thanks for your comment. > > > Python doesn't work with UTF-8 encoded code points; it works with > > Unicode code points. Are you looking for something that checks whether > > something is a palindrome, or locate

Re: .title() - annoying mistake

2021-03-22 Thread Karen Shaeffer via Python-list
Hi Chris, Thanks for your comment. > Python doesn't work with UTF-8 encoded code points; it works with > Unicode code points. Are you looking for something that checks whether > something is a palindrome, or locates palindromes within it? > > def is_palindrome(txt): >return txt == txt[::-1] >

Re: .title() - annoying mistake

2021-03-22 Thread Benjamin Schollnick
>> That's not true for digraphs where there is a third, distinct and >> different "title" case. I think the doc should state that the initial >> character is converted to titlecase. A parenthentical statement that >> titlecase is usually but not always equal to uppercase would be nice, >> but the c

Re: .title() - annoying mistake

2021-03-22 Thread Benjamin Schollnick
>> I guess it depends on what you mean by "character". In my mind, the >> first character of string s is s[1], and I would then expect that >> >> s.title()[1] == s[1].upper() >> > > I presume you mean [0], but no, that's not the case. A single > character can titlecase to two characters, or to a

Re: .title() - annoying mistake

2021-03-22 Thread Chris Angelico
On Tue, Mar 23, 2021 at 2:28 AM Grant Edwards wrote: > The document for str.title() states that the initial character of each > word is converted to uppercase. My point is that for characters that > remain single characters regardless of case that means (to me) that > > s.title()[0] == s[0].upp

Re: .title() - annoying mistake

2021-03-22 Thread Grant Edwards
On 2021-03-22, Chris Angelico wrote: > On Tue, Mar 23, 2021 at 1:18 AM Grant Edwards > wrote: > >> I guess it depends on what you mean by "character". In my mind, the >> first character of string s is s[1], and I would then expect that >> >> s.title()[1] == s[1].upper() >> > I presume you mean [

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Chris Angelico wrote: > Cool thing is, nobody in Python needs to maintain anything here. That's great because I'm actually having trouble with sending log messages over the socket conection you helped me with, would you mind having a look? Regards, robert -- https://mail.python.org/mailman/listi

Re: .title() - annoying mistake

2021-03-22 Thread Chris Angelico
On Tue, Mar 23, 2021 at 1:18 AM Grant Edwards wrote: > > On 2021-03-21, MRAB wrote: > > IMO, the doc is wrong. > > >> Hmm, maybe it's different in 3.10, but the docs I'm seeing look fine. > >> But maybe there's a better way to word it for both of them. > > > > Python 3.9.2 (tags/v3.9.2:1a79785, F

Re: .title() - annoying mistake

2021-03-22 Thread Grant Edwards
On 2021-03-21, MRAB wrote: IMO, the doc is wrong. >> Hmm, maybe it's different in 3.10, but the docs I'm seeing look fine. >> But maybe there's a better way to word it for both of them. > > Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 > bit (AMD64)] on win32 > Type

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Karsten Hilbert wrote: > and life with that wart. Perfectly willing to as long as everybody agrees it's a wart ;-) robert -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-22 Thread Chris Angelico
On Tue, Mar 23, 2021 at 1:01 AM Robert Latest via Python-list 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 standa

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Chris Angelico wrote: > There are a small number of characters which, when case folded, become > more than one character. The sharp S from German behaves thusly: > "ß".upper(), "ß".lower(), "ß".casefold(), "ß".title() > ('SS', 'ß', 'ss', 'Ss') Now we're getting somewhere. I'm a native German

Re: .title() - annoying mistake

2021-03-22 Thread Chris Angelico
On Mon, Mar 22, 2021 at 9:21 PM Robert Latest via Python-list wrote: > > Chris Angelico wrote: > > If you still, after all these posts, have not yet understood that > > title-casing *a single character* is a significant thing, > > I must admit I have no idea what title-casing even is, but I'm eage

Re: .title() - annoying mistake

2021-03-22 Thread Benjamin Schollnick
Robert, I certainly see your point. > My only issue is that I completely fail to see how this function would be > useful enough to warrant the inclusion into the *core* of a general-purpose > language, including its misleading name. But that’s where we have to disagree. Sure, the name cold be

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Chris Angelico wrote: > If you still, after all these posts, have not yet understood that > title-casing *a single character* is a significant thing, I must admit I have no idea what title-casing even is, but I'm eager to learn. The documentation only talks about "words" and "first characters" and

Re: .title() - annoying mistake

2021-03-22 Thread Chris Angelico
On Mon, Mar 22, 2021 at 8:26 PM Robert Latest via Python-list wrote: > > Benjamin Schollnick wrote: > > > >> 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 p

Re: .title() - annoying mistake

2021-03-22 Thread Karsten Hilbert
Am Mon, Mar 22, 2021 at 09:22:51AM + schrieb Robert Latest via Python-list: > >> 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

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Grant Edwards wrote: > On 2021-03-20, Robert Latest via Python-list wrote: >> Mats Wichmann wrote: >>> The problem is that there isn't a standard for title case, >> >> The problem is that we owe the very existence of the .title() method to too >> much weed being smoked during Python development. I

Re: .title() - annoying mistake

2021-03-22 Thread Robert Latest via Python-list
Benjamin Schollnick wrote: > >> 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. > > Up

Re: .title() - annoying mistake

2021-03-21 Thread Chris Angelico
On Mon, Mar 22, 2021 at 2:00 PM Richard Damon wrote: > Basically, titlecasing a word IS making the first letter upper case and > the rest lower case UNLESS the first letter is on of the 31 digraphs > which have a special titlecase version, then that is used for the first > letter. That gets pretty

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
On 3/21/21 10:28 PM, Chris Angelico wrote: > On Mon, Mar 22, 2021 at 12:26 PM Richard Damon > wrote: >> On 3/21/21 7:31 PM, MRAB wrote: >>> On 2021-03-21 22:30, Chris Angelico wrote: On Mon, Mar 22, 2021 at 9:04 AM Grant Edwards wrote: > On 2021-03-21, Chris Angelico wrote: >>

Re: .title() - annoying mistake

2021-03-21 Thread Chris Angelico
On Mon, Mar 22, 2021 at 12:26 PM Richard Damon wrote: > > On 3/21/21 7:31 PM, MRAB wrote: > > On 2021-03-21 22:30, Chris Angelico wrote: > >> On Mon, Mar 22, 2021 at 9:04 AM Grant Edwards > >> wrote: > >>> > >>> On 2021-03-21, Chris Angelico wrote: > >>> > On Mon, Mar 22, 2021 at 2:16 AM Robert

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
On 3/21/21 7:31 PM, MRAB wrote: > On 2021-03-21 22:30, Chris Angelico wrote: >> On Mon, Mar 22, 2021 at 9:04 AM Grant Edwards >> wrote: >>> >>> On 2021-03-21, Chris Angelico wrote: >>> > On Mon, Mar 22, 2021 at 2:16 AM Robert Latest via Python-list >>> wrote: >>> > >>> >> I wonder if .title() pr

Re: .title() - annoying mistake

2021-03-21 Thread MRAB
On 2021-03-21 22:30, Chris Angelico wrote: On Mon, Mar 22, 2021 at 9:04 AM Grant Edwards wrote: On 2021-03-21, Chris Angelico wrote: > On Mon, Mar 22, 2021 at 2:16 AM Robert Latest via Python-list wrote: > >> I wonder if .title() properly capitalizes titles in any language. It doesn't in >

Re: .title() - annoying mistake

2021-03-21 Thread Chris Angelico
On Mon, Mar 22, 2021 at 9:04 AM Grant Edwards wrote: > > On 2021-03-21, Chris Angelico wrote: > > On Mon, Mar 22, 2021 at 2:16 AM Robert Latest via Python-list > > wrote: > > > >> I wonder if .title() properly capitalizes titles in any language. It > >> doesn't in > >> English (nor does it pur

Re: .title() - annoying mistake

2021-03-21 Thread Benjamin Schollnick
>> Heck, how do we prevent it from titlecasing abbreviations? (This is plain >> text not XML…. If it was XML it would be easy!) > > We haven't managed to teach humans how to do that, so I doubt we'll > ever teach a simple standard library function to do it. > > *cough*XMLHttpRequest*cough* Tr

Re: .title() - annoying mistake

2021-03-21 Thread Grant Edwards
On 2021-03-21, Chris Angelico wrote: > On Mon, Mar 22, 2021 at 2:16 AM Robert Latest via Python-list > wrote: > >> I wonder if .title() properly capitalizes titles in any language. It doesn't >> in >> English (nor does it purport to), so it begs the question why it is there in >> the first plac

Re: .title() - annoying mistake

2021-03-21 Thread Grant Edwards
On 2021-03-20, Alan Bawden wrote: > Sibylle Koczian writes: > >Am 20.03.2021 um 09:34 schrieb Alan Bawden: >> >> When you write that code to capitalize your book titles, you should be >> calling .title() rather than .upper() if you are doing it right. >> >But that's exactl

Re: .title() - annoying mistake

2021-03-21 Thread Grant Edwards
On 2021-03-20, Robert Latest via Python-list wrote: > Mats Wichmann wrote: >> The problem is that there isn't a standard for title case, > > The problem is that we owe the very existence of the .title() method to too > much weed being smoked during Python development. It makes specific > assumpti

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
On 3/21/21 2:39 PM, Benjamin Schollnick wrote: >> 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 en

Re: .title() - annoying mistake

2021-03-21 Thread Chris Angelico
On Mon, Mar 22, 2021 at 5:40 AM Benjamin Schollnick wrote: > Heck, how do we prevent it from titlecasing abbreviations? (This is plain > text not XML…. If it was XML it would be easy!) We haven't managed to teach humans how to do that, so I doubt we'll ever teach a simple standard library func

Re: .title() - annoying mistake

2021-03-21 Thread Benjamin Schollnick
> 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 uppercas

Re: .title() - annoying mistake

2021-03-21 Thread Paul Bryan
The topic of titles is complex, and would be significant undertaking to automate. It's not only highly language-dependent, it's also based on the subject work itself, and subject to guidelines of those charged with indexing such works. MusicBrainz guidelines: https://wiki.musicbrainz.org/Style/Tit

Re: .title() - annoying mistake

2021-03-21 Thread Chris Angelico
On Mon, Mar 22, 2021 at 2:16 AM Robert Latest via Python-list wrote: > > Chris Angelico wrote: > > On Sun, Mar 21, 2021 at 10:31 PM Robert Latest via Python-list > > wrote: > >> Yes, I get that. But the purpose it (improperly) serves only makes sense in > >> the English language. > > > > Why? Do t

Re: .title() - annoying mistake

2021-03-21 Thread Robert Latest via Python-list
Chris Angelico wrote: > On Sun, Mar 21, 2021 at 10:31 PM Robert Latest via Python-list > wrote: >> Yes, I get that. But the purpose it (improperly) serves only makes sense in >> the English language. > > Why? Do titles not exist in other languages? Does no other language > capitalize words in book

Re: .title() - annoying mistake

2021-03-21 Thread Robert Latest via Python-list
Benjamin Schollnick wrote: > > I’m sorry Robert, but just because it doesn’t meet your requirements, doesn’t > mean it’s useless. > > I use .title to normalize strings for data comparison, all the time. It’s a > perfect alternative to using .UPPER or .lower. > > Right in the documentation, it sp

Re: .title() - annoying mistake

2021-03-21 Thread Richard Damon
On 3/21/21 8:19 AM, Albert-Jan Roskam wrote: >On 20 Mar 2021 23:47, Cameron Simpson wrote: > > On 20Mar2021 12:53, Sibylle Koczian wrote: > >Am 20.03.2021 um 09:34 schrieb Alan Bawden: > >>The real reason Python strings support a .title() method is surely > >>because Unico

Re: .title() - annoying mistake

2021-03-21 Thread Albert-Jan Roskam
On 20 Mar 2021 23:47, Cameron Simpson wrote: On 20Mar2021 12:53, Sibylle Koczian 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

Re: .title() - annoying mistake

2021-03-21 Thread Chris Angelico
On Sun, Mar 21, 2021 at 10:31 PM Robert Latest via Python-list wrote: > > Chris Angelico wrote: > > On Sun, Mar 21, 2021 at 4:31 AM Robert Latest via Python-list > > wrote: > >> > >> Mats Wichmann wrote: > >> > The problem is that there isn't a standard for title case, > >> > >> The problem is tha

Re: .title() - annoying mistake

2021-03-21 Thread Benjamin Schollnick
>> The problem is that you haven't read the documentation :) It very carefully >> does NOT define itself by language, and its behaviour is identical regardless >> of the language used. > > The documentation says: "The algorithm uses a simple language-independent > definition of a word as groups of

Re: .title() - annoying mistake

2021-03-21 Thread Robert Latest via Python-list
Chris Angelico wrote: > On Sun, Mar 21, 2021 at 4:31 AM Robert Latest via Python-list > wrote: >> >> Mats Wichmann wrote: >> > The problem is that there isn't a standard for title case, >> >> The problem is that we owe the very existence of the .title() method to too >> much weed being smoked durin

Re: .title() - annoying mistake

2021-03-20 Thread Cameron Simpson
On 20Mar2021 23:18, Jon Ribbens wrote: >On 2021-03-20, Cameron Simpson wrote: >> Not to mention that the .title method _predates_ Python's use of >> Unicode >> in strings. > >Well, it predates Python's use of Unicode in the default string type, >but not Python's use of Unicode in strings. > >htt

Re: .title() - annoying mistake

2021-03-20 Thread Jon Ribbens via Python-list
On 2021-03-20, Cameron Simpson wrote: > On 20Mar2021 12:53, Sibylle Koczian 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 be

Re: .title() - annoying mistake

2021-03-20 Thread Cameron Simpson
On 20Mar2021 12:53, Sibylle Koczian 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

Re: .title() - annoying mistake

2021-03-20 Thread Alan Bawden
Sibylle Koczian writes: Am 20.03.2021 um 09:34 schrieb Alan Bawden: > > When you write that code to capitalize your book titles, you should be > calling .title() rather than .upper() if you are doing it right. > But that's exactly what he's doing, with a result which is document

Re: .title() - annoying mistake

2021-03-20 Thread Chris Angelico
On Sun, Mar 21, 2021 at 4:31 AM Robert Latest via Python-list wrote: > > Mats Wichmann wrote: > > The problem is that there isn't a standard for title case, > > The problem is that we owe the very existence of the .title() method to too > much weed being smoked during Python development. It makes

Re: .title() - annoying mistake

2021-03-20 Thread Robert Latest via Python-list
Mats Wichmann wrote: > The problem is that there isn't a standard for title case, The problem is that we owe the very existence of the .title() method to too much weed being smoked during Python development. It makes specific assumptions about a specific use case of one specific language. It doesn

Re: .title() - annoying mistake

2021-03-20 Thread Sibylle Koczian
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. Consider: >>> '\u01f1'.upper() '\u01f1' This is the "DZ" character.

Re: .title() - annoying mistake

2021-03-20 Thread David Kolovratník
On Sat, Mar 20, 2021 at 04:34:02AM -0400, Alan Bawden wrote: > 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. Consider: > >>>> '\u01f1'.upper() >'\u01f1' > > Th

Re: .title() - annoying mistake

2021-03-20 Thread 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. Consider: >>> '\u01f1'.upper() '\u01f1' This is the "DZ" character. >>> '\u01f1'.lower() '\u01f3' This is the "

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
AM To: Paul Bryan Cc: Python Subject: Re: .title() - annoying mistake Thanks very much! That's annoying. You have to roll your own solution! Kind Regards, Abdur-Rahmaan Janhangeer about <https://compileralchemy.github.io/> | blog <https://www.pythonkitchen.com> github <https:/

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