[Python-3000] locale-aware strings ?

Nick Coghlan ncoghlan at gmail.com
Sat Sep 2 05:47:57 CEST 2006


Fredrik Lundh wrote:
> today's Python supports "locale aware" 8-bit strings; e.g.
> 
>     >>> import locale
>     >>> "åäö".isalpha()
>     False
>     >>> locale.setlocale(locale.LC_ALL, "sv_SE")
>     'sv_SE'
>     >>> "åäö".isalpha()
>     True
> 
> to what extent should this be supported by Python 3000 ?

Since all strings will be Unicode by then:

 >>> u"åäö".isalpha()
True

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list