New submission from Alex <[email protected]>:
I often use to the Python REPL to perform some simple calculations (typically
some combinatorial or probabilities computation).
I believe it would be a nice improvement if the number displayed in the REPL
would be formatted as if f"{result:_}" was given (with the underscore
separators). For example:
>>> 36 ** 7
78_364_164_096
As I understand things:
* the REPL always shows the __repr__
* updating the __repr__ for int/float is a no-no for backward compatibility
reasons
If these assumptions are correct (please correct me if this is wrong), then I
guess this cannot be implemented, unless I missed something?
----------
components: Interpreter Core
messages: 406934
nosy: alexprengere
priority: normal
severity: normal
status: open
title: Improve REPL with the underscore separators for int/float
type: behavior
versions: Python 3.11
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45892>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com