[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator

STINNER Victor report at bugs.python.org
Tue Nov 20 17:00:43 EST 2018


STINNER Victor <vstinner at redhat.com> added the comment:

Minimum reproducer, on Fedora 29:

import locale
locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8')
print(ascii('{:n}'.format(1.5)))

Current result:

'H,5'

Output with PR 10623:

'1,5'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33954>
_______________________________________


More information about the Python-bugs-list mailing list