Pablo Galindo Salgado <[email protected]> added the comment:
Is not about the eagerness, the problem is that it matches *first*, the parser
never gets to the indentation error in the second phase.
For example, with:
print(3) $ 34
❯ ./python bug.py
File "/home/pablogsal/github/python/main/bug.py", line 1
print(3) $ 34
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
The problem is that is matching the (3) as print + a number between
parentheses. We just need to disallow to continue matching on the right
if it finds a '('.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34013>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com