[Python-ideas] Improve readability of long numeric literals

Alexander Heger python at 2sn.net
Wed Feb 10 08:21:09 EST 2016


>> 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.
>
> No, 100_{002} is the number 4.

Well, as you know, even more strictly speaking, in a LaTeX text you'd have
to write $100_{002}$.  But in more colloquial use of LaTeX syntax, e.g., in
plain text abstracts, the braces are often dropped for the sake of
readability.  Beside, base 0 or base 1 make little sense.

-Alexander


Sent from my Pixel C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160211/05130e8a/attachment-0001.html>


More information about the Python-ideas mailing list