[Python-ideas] Improve readability of long numeric literals

Random832 random832 at fastmail.com
Wed Feb 10 23:55:18 EST 2016


On Wed, Feb 10, 2016, at 16:42, Chris Angelico wrote:
> On Thu, Feb 11, 2016 at 5:00 AM, Random832 <random832 at fastmail.com>
> wrote:
> > I don't think it's particularly important to support this case, but the
> > sequence digit/dot/name with no spaces between is a syntax error now,
> > because the digit/dot is interpreted as a floating point constant.
> 
> Only if that's the only dot.

But only the first dot is part of the numeric literal and therefore even
theoretically eligible to have an underscore before or after it accepted
as part of the literal, so that goes without saying. I was just pointing
out that the underscore this rule disallows can't actually start an
attribute name.


More information about the Python-ideas mailing list