On Mon, Aug 29, 2016 at 1:55 PM, Sven R. Kunze <srku...@mail.de> wrote:

> There was no reasonable real-world code examples taken from important
> projects, that would be significantly improved by underscores in numbers.
>

I recall dozens of real world examples that came up during the discussion,
and have written very numerous such examples in code of my own.  This is
something that directly affects readability in code I write almost every
day, and is a clear and obvious win.

I taught examples *today* where I would have badly liked to have underscore
separators, and it was obvious to me and students that awkwardness.
Writing, e.g. `range(int(1e7))` feel contrives (but usually the way I do
it).  Writing `range(10000000)` is nearly impossible to parse visually.  In
contrast, writing `range(10_000_000)` will be immediately clear and obvious.

None of those things can be said of SI units as Python literals.

-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to