Skip to content

IndentationError works differently with cpython in interective shell. #3892

@dev-bearabbit

Description

@dev-bearabbit

cpython returns IndentationError when it gets ‘\n’ after statements like for, if

  • cpython
>>> for i in range(1,4):
... 
  File "<stdin>", line 2
    
    ^
IndentationError: expected an indented block

but rustpython keeps waiting until some string come in.

  • rustpython
>>>>> for i in range(1,4):
..... 
..... 
..... d
..... 
IndentationError: expected an indented block at line 4 column 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugSomething isn't workingC-compatA discrepancy between RustPython and CPythonz-ca-2022Tag to track contrubution-academy 2022

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions