Skip to content

Generate SyntaxError at integer starting with 0#1430

Merged
windelbouwman merged 2 commits into
RustPython:masterfrom
HyeockJinKim:issue1422
Sep 28, 2019
Merged

Generate SyntaxError at integer starting with 0#1430
windelbouwman merged 2 commits into
RustPython:masterfrom
HyeockJinKim:issue1422

Conversation

@HyeockJinKim

Copy link
Copy Markdown
Contributor

Generate syntaxError at integer starting with 0,
not zero

Fixes #1422

Generate syntaxError at integer starting with 0,
not zero

Fixes RustPython#1422
@windelbouwman

Copy link
Copy Markdown
Contributor

Nicely implemented! I'm still a bit clueless why a leading zero is not allowed. Do you have any ideas?

@windelbouwman windelbouwman merged commit 188ff0e into RustPython:master Sep 28, 2019
@coolreader18

Copy link
Copy Markdown
Member

I think it's ambiguous/not explicit to whether the person writing it intended it to be a decimal literal or octal literal, as some languages take a leading 0 to mean octal, so they decided to ban it altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integer problem starting with 0

3 participants