[issue3067] setlocale fails with unicode strings on Py2 and with byte strings on Py3

2011-06-18 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3067 ___ ___ Python-bugs-list

[issue3067] setlocale fails with unicode strings on Py2 and with byte strings on Py3

2010-08-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The docs say that the locale arg should be None, tuple, or string, so I take that to mean that Unicode should be OK for 2.x, and that would help porting to 3.x. If bytes are rejected in 3.x, there should be TypeError raised, not ValueError,

[issue3067] setlocale fails with unicode strings on Py2 and with byte strings on Py3

2009-02-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: 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