Fredrik Lundh schrieb: > 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 ?
I would like to see locale-aware operations, but with an explicit locale, e.g. import locale l = locale.load(locale.LC_ALL, "sv_SE") print l.isalpha("åäö") (i.e. character properties become locale methods, not string methods). To implement that, we would have to incorporate ICU, which would be a tough decision to make (or have our own implementation based on the tables that ICU uses). Alternatively, we could try to get such locale objects from system APIs where available (e.g. <xlocale.h> in glibc), and not provide them on systems that don't have locale objects in their APIs. Regards, Martin _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com