[Python-ideas] Improve readability of long numeric literals

MRAB python at mrabarnett.plus.com
Tue Feb 9 19:45:58 EST 2016


On 2016-02-09 23:27, Oscar Benjamin wrote:
> On 9 Feb 2016 23:18, "Guido van Rossum" <guido at python.org
> <mailto:guido at python.org>> wrote:
>  >
>  > Indeed, "123 456" is a no-no, but "123_456" sound good. (Not sure
>  > about "12_34_56" but there are probably use cases for that too.)
>  >
>
> It would be useful for hex literals. There are other more confusing
> possibilities such as 1_._0_e_-_1_0.
>
The Ada programming language allows underscores in numerals, but 
requires there to be a digit on both sides of the underscore.



More information about the Python-ideas mailing list