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 lemburg
Recipients alexs, ezio.melotti, lemburg, loewis, senn
Date 2009-10-14.20:26:09
SpamBayes Score 1.4057222e-10
Marked as misclassified No
Message-id <4AD633E4.9010301@egenix.com>
In-reply-to <1255546815.92.0.62328909151.issue4610@psf.upfronthosting.co.za>
Content
Jeff Senn wrote:
> However .capitalize() is a bit weird; and I'm not sure it isn't 
> incorrectly implemented now:
> 
> It UPPERCASES the first character, rather than TITLECASING, which is 
> probably wrong in the very few cases where it makes a difference:
> e.g. (using Croatian ligatures)
> 
>>>> u'\u01c5amonjna'.title()
> u'\u01c4amonjna'
>>>> u'\u01c5amonjna'.capitalize()
> u'\u01c5amonjna'
> 
> "Capitalization" is not precisely defined (by the Unicode standard) -- 
> the currently python implementation doesn't even do what the docs say: 
> "makes the first character have upper case" (it also lower-cases all 
> other characters!), however I might argue that a more useful 
> implementation "makes the first character have titlecase..."

You don't have to worry about .capitalize() and .swapcase() :-)

Those methods are defined by their implementation and don't resemble
anything defined in Unicode.

I agree that they are, well, not that useful.
History
Date User Action Args
2009-10-14 20:26:11lemburgsetrecipients: + lemburg, loewis, senn, ezio.melotti, alexs
2009-10-14 20:26:09lemburglinkissue4610 messages
2009-10-14 20:26:09lemburgcreate