Message212350
| 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:07 | rene | set | recipients: + rene |
| 2014-02-27 11:56:07 | rene | set | messageid: <1393502167.29.0.618138255127.issue20793@psf.upfronthosting.co.za> |
| 2014-02-27 11:56:07 | rene | link | issue20793 messages |
| 2014-02-27 11:56:06 | rene | create | |