[issue10135] Format specifier 'n' not working

Boštjan Mejak report at bugs.python.org
Mon Oct 18 12:26:03 CEST 2010


New submission from Boštjan Mejak <bostjan.mejak at gmail.com>:

Have your default locale set to 'Slovenian' which uses a comma for the decimal symbol, like 2.76 is written as 2,76. Observe that the format specifier 'n' does not work for the default 'Slovenian' locale setting.

Then try running this in the Python interpreter:
'{number:.3n}'.format(number=2.76)

You get this:
>>> '{number:.3n}'.format(number=2.76)
'2.76'

Excepted the is the return value '2,76'. Please fix this bug.

----------
components: Interpreter Core
messages: 119003
nosy: Retro
priority: normal
severity: normal
status: open
title: Format specifier 'n' not working
type: behavior
versions: 3rd party, Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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


More information about the Python-bugs-list mailing list