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 skrah
Recipients mark.dickinson, skrah
Date 2009-12-05.10:44:17
SpamBayes Score 2.1891568e-05
Marked as misclassified No
Message-id <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za>
In-reply-to
Content
Hi, the following works in 2.7 but not in 3.x:

>>> import locale
>>> from decimal import *
>>> locale.setlocale(locale.LC_NUMERIC, 'fi_FI')
'fi_FI'
>>> format(Decimal('1000'), 'n')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.2/decimal.py", line 3632, in __format__
    spec = _parse_format_specifier(specifier, _localeconv=_localeconv)
  File "/usr/lib/python3.2/decimal.py", line 5628, in
_parse_format_specifier
    _localeconv = _locale.localeconv()
  File "/usr/lib/python3.2/locale.py", line 111, in localeconv
    d = _localeconv()
ValueError: Cannot convert byte to string
History
Date User Action Args
2009-12-05 10:44:19skrahsetrecipients: + skrah, mark.dickinson
2009-12-05 10:44:19skrahsetmessageid: <1260009859.57.0.721297634888.issue7442@psf.upfronthosting.co.za>
2009-12-05 10:44:18skrahlinkissue7442 messages
2009-12-05 10:44:17skrahcreate