Author Greg Price
Recipients Greg Price, benjamin.peterson, ezio.melotti, lemburg, serhiy.storchaka, vstinner
Date 2019-08-14.18:26:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565807190.59.0.0807605011381.issue37848@roundup.psfhosted.org>
In-reply-to
Content
> I believe that all locale specific things should be in the locale module, not in the str class.

The locale module is all about doing things with the current process-global Unix locale. I don't think that'd be an appropriate interface for this -- if it's worth doing, it's worth doing in such a way that the same web server process can handle requests for Turkish-, Lithuanian-, and Spanish-speaking users without having to reset a global variable for each one.

> If a locale specific mapping is requested, this should be done
> explicitly by e.g. providing a parameter to str.lower() / upper() /
> title().

I like this design.

I said "locale" above, but that wasn't quite right, I think -- the file says e.g. `tr`, not `tr_TR` and `tr_CY`, and it describes the identifiers as "language IDs".  So perhaps

str.lower(*, lang=None)

?  And then

"I".lower(lang="tr") == "ı" == "\N{Latin small letter dotless I}"
History
Date User Action Args
2019-08-14 18:26:30Greg Pricesetrecipients: + Greg Price, lemburg, vstinner, benjamin.peterson, ezio.melotti, serhiy.storchaka
2019-08-14 18:26:30Greg Pricesetmessageid: <1565807190.59.0.0807605011381.issue37848@roundup.psfhosted.org>
2019-08-14 18:26:30Greg Pricelinkissue37848 messages
2019-08-14 18:26:30Greg Pricecreate