Closed rhubarbdog closed 5 years ago
Thanks for the report. A simplified example that exhibits the same behaviour is:
if x:
pass
This is really something to address upstream in the main MicroPython repository. But in my opinion it's not worth fixing: it would be cost extra code for a rarely hit case. And anyway, IndentationError is a subclass of SyntaxError, so SyntaxError is technically correct, just a less specific error.
Yes that's fair. Is it worth not implementing IndentationError
at all and saving a few bytes
Thank you @rhubarbdog for the report and @dpgeorge for the explanation. Since it looks like the original question has been answered I'll close this issue.
This code generates a
SyntaxError
, but it should create anIndentationError