[issue35638] Introduce fixed point locale aware format type for floating point numbers

Stefan Krah report at bugs.python.org
Wed Jan 9 05:09:23 EST 2019


Stefan Krah <stefan at bytereef.org> added the comment:

> Since it seems like we are still at the "idea" stage, would it make sense to add a function which accept options to choose how to format a number?

Maybe, but I think for format() Eric's latest proposal on python-ideas is great ("*f" for "f + LC_NUMERIC", "$f" for "f + LC_MONETARY".

For me that's sufficient. Does locale.format_string() handle the other cases?


> By the way, the decimal module doesn't support properly the following corner case: LC_NUMERIC using an encoding different than LC_CTYPE encoding. I wrote https://github.com/python/cpython/pull/5191 but I abandonned my change.

Well, I *discovered and opened* #7442 several years ago, and you said:

"I see that various people contributed to the issue, but it looks like the only user asking for the request is Stefan Krah. I prefer to close the issue and wait until more users ask for it before considering again the patch, or find a different way to implement the feature (support LC_NUMERIC and LC_CTYPE locales using a different encoding)."


So why would you think that I'm not aware of that issue? It has low priority for me and I hesitate to depend on the official locale functions in decimal because I don't want to be involved in additional issue reports in that area.

----------

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


More information about the Python-bugs-list mailing list