[issue45995] string formatting: normalize negative zero

Steven D'Aprano report at bugs.python.org
Mon Dec 6 09:18:04 EST 2021


Steven D'Aprano <steve+python at pearwood.info> added the comment:

It was decided long ago that % formatting would not be enhanced with new features. I think that it is supposed to match the standard C formatting codes, and nothing else.

So this is unlikely to be approved for % formatting.

It *might* be approved for the format method and f-strings. (I suspect that unless you get immediate and uncontroversial agreement from multiple core developers, you may need to take it for further discussion and perhaps even a PEP.)

What you call a "distraction" I consider to be critical part of the display. The numbers you are displaying actually are negative, and rounding them for display does not change that. So they ought to show the minus sign. So I'm not really very sympathetic to this feature request.

----------
nosy: +steven.daprano
versions: +Python 3.11

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


More information about the Python-bugs-list mailing list