homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients markon, nickd, rhettinger, twb
Date 2009年09月28日.18:29:29
SpamBayes Score 6.60166e-10
Marked as misclassified No
Message-id <1254162571.41.0.99280641515.issue7008@psf.upfronthosting.co.za>
In-reply-to
Content
I agree with the OP that str.title should be made smarter. As it
stands, it is a likely bug factory that would pass unittests, then
generate unpleasant results with real user inputs.
Extending on Thomas's comment, I think string.capwords() needs to be
deprecated and eliminated. It is an egregious hack that has unfortunate
effects such as dropping runs for repeated spaces and incorrectly
handling strings in quotes. 
As it stands, we have two methods that both don't quite do what we would
really want in a title casing method (correct handling of apostrophe's
and quotation marks, keeping the string length unchanged, and only
changing desired letters from lower to uppercase with no other
side-effects).
History
Date User Action Args
2009年09月28日 18:29:31rhettingersetrecipients: + rhettinger, markon, twb, nickd
2009年09月28日 18:29:31rhettingersetmessageid: <1254162571.41.0.99280641515.issue7008@psf.upfronthosting.co.za>
2009年09月28日 18:29:30rhettingerlinkissue7008 messages
2009年09月28日 18:29:29rhettingercreate

AltStyle によって変換されたページ (->オリジナル) /