This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rene
Recipients rene
Date 2014-02-27.11:56:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1393502167.29.0.618138255127.issue20793@psf.upfronthosting.co.za>
In-reply-to
Content
locale.setlocale() does not work if you pass it a ``unicode`` object instead of a ``str`` (locale.py, line 576):

    ``if locale and type(locale) is not type(""):``

Maybe it would be better to do a check like this?

    ``if locale and not isinstance(locale, basestring):``

In particular, this can bite you if you use the ``unicode_literals`` future import, displaying a not-so-helpful error message ("ValueError: too many values to unpack" in _build_localename).
History
Date User Action Args
2014-02-27 11:56:07renesetrecipients: + rene
2014-02-27 11:56:07renesetmessageid: <1393502167.29.0.618138255127.issue20793@psf.upfronthosting.co.za>
2014-02-27 11:56:07renelinkissue20793 messages
2014-02-27 11:56:06renecreate