Skip to content

Confusing Pyright errors from Python-2-style octal literals #742

Open
@microbit-matt-hillsdon

Description

@microbit-matt-hillsdon

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
>>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions