[Python-ideas] Improve readability of long numeric literals
Ben Finney
ben+python at benfinney.id.au
Tue Feb 9 19:06:20 EST 2016
Ian Kelly <ian.g.kelly at gmail.com> writes:
> On Tue, Feb 9, 2016 at 2:40 PM, Manuel Cerón <ceronman at gmail.com> wrote:
> > Another option is to use spaces instead of underscores:
> >
> >>>> opts.write_buffer_size = 67 108 864
> >
> > […]
> > The disadvantage is that, as far as I known, no other languages do
> > this.
>
> Another disadvantage to using spaces is that it could mask an
> inadvertently omitted operator that previously would have been a
> SyntaxError.
The exact same fact – that a proposed new syntax was previously a syntax
error – is commonly presented as a positive. We know there are no valid
Python programs already using the construct to mean something else.
So I don't think it's reasonable to present that now as though it were
negative.
(good sigmonster, have a cookie)
--
\ “… correct code is great, code that crashes could use |
`\ improvement, but incorrect code that doesn’t crash is a |
_o__) horrible nightmare.” —Chris Smith, 2008-08-22 |
Ben Finney
More information about the Python-ideas
mailing list