New submission from Saulius Žemaitaitis: Steps to reproduce:
python2.7 -c "import locale; locale.setlocale(locale.LC_ALL, u'en_US')" Raises: ValueError: too many values to unpack Problem lies in locale.py file from the standard library. It checks if locale is string incorrectly: if locale and type(locale) is not type(""): # convert to string locale = normalize(_build_localename(locale)) I think it should instead check if locale is basestring: locale and not isinstance(locale, basestring): # <..> If above fix looks correct I'll submit it as a patch. ---------- components: Library (Lib) messages: 238914 nosy: Saulius Žemaitaitis priority: normal severity: normal status: open title: locale.setlocale checks locale name for string incorrectly type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23739> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com