Terry Davis <terry.y.da...@gmail.com> added the comment:
Victor, > '_.f' would be the same as '_f'? No, the example in my original post is wrong, '_.f' isn't allowed now. The proposal should use '_f' to describe the current behavior. > Should "._f" be allowed to only add underscores in the fractional part? (for > consistency?) Yes, but not for consistency with the above usage, instead it's so both fractional and integral underscores can be specified on their own. Here is my attempt at updating the format spec. The only problem I have with it is that it allows a naked '.'; I don't know how to specify "dot must be followed by one or both of 'float_grouping' and 'precision'". Current: format_spec ::= [[fill]align][sign][#][0][width][grouping_option][.precision][type] Proposed: format_spec ::= [[fill]align][sign][#][0][width][grouping_option][.[float_grouping][precision]][type] fill ::= <any character> align ::= "<" | ">" | "=" | "^" sign ::= "+" | "-" | " " width ::= digit+ grouping_option ::= "_" | "," float_grouping ::= "_" precision ::= digit+ type ::= "b" | "c" | "d" | "e" | "E" | "f" | "F" | "g" | "G" | "n" | "o" | "s" | "x" | "X" | "%" ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43624> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com