[Python-ideas] Improve readability of long numeric literals

Alexander Heger python at 2sn.net
Wed Feb 10 06:37:30 EST 2016


>>>> opts.write_buffer_size = 67108864
>
> The disadvantage is that, as far as I known, no other languages do this.

This is not true.  It is absolutely legal in FORTRAN

      program f
      print*, 123 456
      end

will just print the number 123456.  Hence for me as a FORTRAN this
would seem a natural thing to do.  Better than the underscores ... I
would associate the with the LaTeX maths mode index operator, and then
I would read 100_002 as the number 4.

-Alexander


More information about the Python-ideas mailing list