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 an optional 
argument to .title() which if supplied should tell it do the workaround.   Or, 
perhaps better, only capitalize the first word and subsequent words that are 
preceded by a white space.  That should solve "Someone's Apostrophe" and 
"Hyphenated-expressions". Someone who looks into this should check if the 
second part of a hyphenated expression needs to be capitalized. 

--- Joseph S.   


Teledyne Confidential; Commercially Sensitive Business Data

-----Original Message-----
From: Abdur-Rahmaan Janhangeer <arj.pyt...@gmail.com> 
Sent: Friday, March 19, 2021 11:02 AM
To: Paul Bryan <pbr...@anode.ca>
Cc: Python <python-list@python.org>
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://github.com/Abdur-RahmaanJ>
Mauritius

>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to