Greg Price <[email protected]> added the comment:
> 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}"
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37848>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com