[issue33471] string format with 'n' failling with french locales

2018-05-13 Thread David Vasseur

David Vasseur <dvass...@gmail.com> added the comment:

>>> locale.localeconv()
{'int_curr_symbol': 'EUR ', 'currency_symbol': '€', 'mon_decimal_point': ',', 
'mon_thousands_sep': '\u202f', 'mon_grouping': [3, 0], 'positive_sign': '', 
'negative_sign': '-', 'int_frac_digits': 2, 'frac_digits': 2, 'p_cs_precedes': 
0, 'p_sep_by_space': 1, 'n_cs_precedes': 0, 'n_sep_by_space': 1, 'p_sign_posn': 
1, 'n_sign_posn': 1, 'decimal_point': ',', 'thousands_sep': '\u202f', 
'grouping': [3, 0]}

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33471>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33471] string format with 'n' failling with french locales

2018-05-12 Thread David Vasseur

New submission from David Vasseur <dvass...@gmail.com>:

Python 3.6.5 (default, Apr 14 2018, 13:17:30) 
[GCC 7.3.1 20180406] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('{:n}'.format(int(12)))
12 <-- ok --

>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
'fr_FR.UTF-8'
>>> print('{:n}'.format(int(12)))
(empty) <-- error --
'{:n}'.format(int(12))
'Àæ' <-- error --

please note that with >999 numbers, it's working fine:
>>> print('{:n}'.format(int(1000)))
1 000 <-- ok --

--
components: Extension Modules
messages: 316426
nosy: David Vasseur
priority: normal
severity: normal
status: open
title: string format with 'n' failling with french locales
type: behavior
versions: Python 3.6

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33471>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com