diff options
| author | Jeff Epler <jepler@unpythonic.net> | 2025-09-17 10:29:54 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-10-06 15:07:34 +1100 |
| commit | 5552fbe17240aedcada2ce3a5fbb5136a3087f65 (patch) | |
| tree | 1d1ea7bb74b63388d9d46a6f7fc9af2f278c8bde /tools/metrics.py | |
| parent | 01a11ea45efe8e5fe7d2049902f7d6e6818d3ec1 (diff) | |
py/mpprint: Correctly format leading zeros with separators.
Correctly format integers when there are leading zeros with a grouping
character, such as "{:04,d}".format(0x100) -> "0,256".
The new padding patterns for commas-and-zeroes and underscores-and-zeroes
are smooshed together into the existing pad_zeroes to save space.
Only the two combinations of (decimal + commas) and (other bases +
underscores) are properly supported.
Also add a test for it.
Fixes issue #18082.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Diffstat (limited to 'tools/metrics.py')
0 files changed, 0 insertions, 0 deletions
