Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jan 15, 2018

Fix decimal.Decimal formatter when the LC_NUMERIC locale encoding is
different than the LC_CTYPE encoding: reuse
_Py_GetLocaleconvNumeric() to decode localeconv() correctly, set
tempoarily setlocale() if needed.

https://bugs.python.org/issue31900

@vstinner
Copy link
Member Author

@skrah: So, what do you think?

Copy link
Contributor

@skrah skrah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patched version introduces errors in deccheck.py. The formatting code is tricky, which is why I wasn't too enthusiastic about the patch to begin with.

I'd prefer to do nothing here.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

Fix decimal.Decimal formatter when the LC_NUMERIC locale encoding is
different than the LC_CTYPE encoding: reuse
_Py_GetLocaleconvNumeric() to decode localeconv() correctly, set
tempoarily setlocale() if needed.

Add mpd_spec_t.locale field.
@vstinner
Copy link
Member Author

The patched version introduces errors in deccheck.py.

Oh. My type == 'n' test doesn't work, libmpdec replaces 'n' with 'g'. I don't know how I missed this.

I modified my PR to add a new mpd_spec_t.locale field.

@vstinner
Copy link
Member Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@skrah: please review the changes made to this pull request.

@vstinner
Copy link
Member Author

@skrah: I fixed my obvious mistake. Would you mind to look again to my change? Is it now ok to merge it?

@skrah
Copy link
Contributor

skrah commented Jan 30, 2018

@vstinner I'll look at it when I have time. I still think this is nice-to-have, but very low priority.

@vstinner vstinner closed this Feb 1, 2018
@vstinner vstinner deleted the decimal_dot branch May 29, 2018 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants