[New-bugs-announce] [issue42914] pprint numbers with underscore

Felipe report at bugs.python.org
Tue Jan 12 18:21:21 EST 2021

New submission from Felipe <felipe.nospam.ochoa at gmail.com>:

It would be nice if pprint learned to insert underscores in long numbers

Current behavior:

>>> pprint.pprint(int(1e9))

Desired behavior

>>> pprint.pprint(int(1e9))

Wikipedia tells me that "groups of 3" is the international standard to be followed here [1][2]

[1] https://en.wikipedia.org/wiki/ISO_31-0#Numbers
[2] https://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping

components: Library (Lib)
messages: 384982
nosy: fov
priority: normal
severity: normal
status: open
title: pprint numbers with underscore
type: enhancement
versions: Python 3.10

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list