Ben Finney <ben+pyt...@benfinney.id.au> writes:

> Hmm. That is a confusing inconsistency, I agree. It is deliberate, and
> explicitly documented:
>
>     Note that leading zeros in a non-zero decimal number are not
>     allowed. This is for disambiguation with C-style octal literals,
>     which Python used before version 3.0.
>
>     
> <URL:https://docs.python.org/3/reference/lexical_analysis.html#integer-literals>
>
> which does not explain why “non-zero decimal number” was chosen, rather
> than simply any decimal number.

I have reported <URL:https://bugs.python.org/issue26490> to try to
resolve this ambiguity.

-- 
 \          “They who can give up essential liberty to obtain a little |
  `\            temporary safety, deserve neither liberty nor safety.” |
_o__)                                   —Benjamin Franklin, 1775-02-17 |
Ben Finney

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to