[issue45995] string formatting: normalize negative zero
John Belmonte
report at bugs.python.org
Sun Dec 12 03:31:27 EST 2021
John Belmonte <john at neggie.net> added the comment:
> For Decimal, we'd need to "own" the string formatting, taking that responsibility away from mpdecimal, but there are already other reasons to do that.
After some digging, I believe this is the background on forking pieces of mpdecimal (and why the existing source copy inside Python doesn't count as a fork):
https://bugs.python.org/issue45708#msg405895
https://github.com/python/cpython/pull/29438
If I understand correctly, the PR for supporting underscore separators in Decimal formatting is only taking control of generating a mpd_spec_t from the spec string. Formatting itself is still done by mpd_qformat_spec().
So there's outstanding work to also pull the formatting code itself into _decimal.c. (And this is wanted anyway to reconcile existing libmpdec formatting modifications: https://github.com/python/cpython/commit/298131a44896a4fec1ea829814ad52409d59aba5)
And this is all because vendors have the crazy practice of unbundling libmpdec from Python. (If a project is bundling the source of another, there may be some reason...?)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45995>
_______________________________________
More information about the Python-bugs-list
mailing list