Skip to content

[3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) - #5192

Merged
vstinner merged 2 commits into
python:3.6from
vstinner:localeconv36
Jan 15, 2018
Merged

vstinner merged 2 commits into
python:3.6from
vstinner:localeconv36

Conversation

@vstinner

@vstinner vstinner commented Jan 15, 2018 •

Copy link
Copy Markdown
Member
  • Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
    thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
    rather than decoding from the LC_CTYPE encoding.
  • Modify locale.localeconv() and "n" formatter of str.format() (for
    int, float and complex to use _Py_GetLocaleconvNumeric()
    internally.

(cherry picked from commit cb064fc)

https://bugs.python.org/issue31900

* Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
  thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
  rather than decoding from the LC_CTYPE encoding.
* Modify locale.localeconv() and "n" formatter of str.format() (for
  int, float and complex to use _Py_GetLocaleconvNumeric()
  internally.

(cherry picked from commit cb064fc)
@vstinner
vstinner merged commit 5f959c4 into python:3.6 Jan 15, 2018
@vstinner
vstinner deleted the localeconv36 branch January 15, 2018 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants