python-editor-v3 icon indicating copy to clipboard operation
python-editor-v3 copied to clipboard

Confusing Pyright errors from Python-2-style octal literals

Open microbit-matt-hillsdon opened this issue 3 years ago • 0 comments
trafficstars

image

vs

Python 3.9.10 (main, Jan 15 2022, 11:48:00) 
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 0123
  File "<stdin>", line 1
    0123
       ^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
>>> 0o123
83
>>> 

microbit-matt-hillsdon avatar May 11 '22 09:05 microbit-matt-hillsdon