Issue33471
Created on 2018-05-12 11:30 by David Vasseur, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 6861 | closed | licht-t, 2018-05-15 15:10 | |
| Messages (4) | |||
|---|---|---|---|
| msg316426 - (view) | Author: David Vasseur (David Vasseur) | Date: 2018-05-12 11:30 | |
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 --
|
|||
| msg316442 - (view) | Author: Eric V. Smith (eric.smith) * ![]() |
Date: 2018-05-13 01:56 | |
After locale.setlocale(locale.LC_ALL, ''), what does local.localeconv() return? |
|||
| msg316456 - (view) | Author: David Vasseur (David Vasseur) | Date: 2018-05-13 09:19 | |
>>> 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]}
|
|||
| msg316548 - (view) | Author: Licht Takeuchi (licht-t) * | Date: 2018-05-14 18:46 | |
I am working on this and have found why this is happening. I'll make PR in few days. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:00 | admin | set | github: 77652 |
| 2020-01-12 02:29:51 | cheryl.sabella | set | status: open -> closed superseder: float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator resolution: duplicate stage: patch review -> resolved |
| 2018-05-18 17:23:26 | terry.reedy | set | versions: + Python 3.7, Python 3.8 |
| 2018-05-15 15:10:09 | licht-t | set | keywords:
+ patch stage: patch review pull_requests: + pull_request6535 |
| 2018-05-14 18:46:42 | licht-t | set | nosy:
+ licht-t messages: + msg316548 |
| 2018-05-13 09:19:40 | David Vasseur | set | messages: + msg316456 |
| 2018-05-13 01:56:12 | eric.smith | set | nosy:
+ eric.smith messages: + msg316442 |
| 2018-05-12 11:30:06 | David Vasseur | create | |
