[issue3067] setlocale error message is confusing

Jyrki Pulliainen report at bugs.python.org
Tue Oct 18 11:44:45 CEST 2011


Jyrki Pulliainen <jyrki at dywypi.org> added the comment:

Added a patch that implements two things:

setlocale now raises locale.Error('Locale must be None, a string, or an iterable of two strings -- language code, encoding.'). I decided to remove the proposed .format(locale), as it wasa a bit confusing when passing a tuple containing invalid items.

I also added two tests, one for bytes and another for a tuple of two bytes.

----------
keywords: +patch
nosy: +nailor
Added file: http://bugs.python.org/file23439/issue3067.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3067>
_______________________________________


More information about the Python-bugs-list mailing list