[issue39568] FORMATTING grouping_option ValueError: Cannot specify ', ' with ...

Another One report at bugs.python.org
Thu Feb 6 10:12:23 EST 2020


Another One <tn5v2l at gmail.com> added the comment:

Not for 3 bits, just for 4 bits, like this:
>>> print("{:_b}".format(123456))
1_1110_0010_0100_0000

And as I already said: "But '_' groups delimiter properly work with any integer representation including decimals, hexadecimals, binaries, octals, etc.." Not only for binaries.
Why comma delimiter is not?
Logic must be the same. Simple use the one procedure for '_' delimiter with permit comma as parameter, instead of two different logic.

----------

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


More information about the Python-bugs-list mailing list