Message82511
FWIW the type("") is gone in Py3, now it is:
"if locale and not isinstance(locale, _builtin_str):"
where "from builtins import str as _builtin_str"
(http://svn.python.org/view/python/branches/py3k/Lib/locale.py?view=markup)
However Py3.0 now raises the same error when the second arg is a byte
string:
>>> locale.setlocale(locale.LC_ALL, b'ja_JP.utf8')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Programs\Python30\lib\locale.py", line 500, in setlocale
locale = normalize(_build_localename(locale))
File "C:\Programs\Python30\lib\locale.py", line 408, in _build_localename
language, encoding = localetuple
ValueError: too many values to unpack
On Py3, locale.setlocale() should allow only unicode strings and reject
byte strings. |
|
Date |
User |
Action |
Args |
2009-02-20 03:08:11 | ezio.melotti | set | recipients:
+ ezio.melotti, vincent.chute |
2009-02-20 03:08:11 | ezio.melotti | set | messageid: <1235099291.2.0.940947004682.issue3067@psf.upfronthosting.co.za> |
2009-02-20 03:08:09 | ezio.melotti | link | issue3067 messages |
2009-02-20 03:08:07 | ezio.melotti | create | |
|