This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lys.nikolaou
Recipients BTaskaya, gvanrossum, lys.nikolaou, pablogsal
Date 2020-05-08.00:56:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588899388.95.0.62296080683.issue40546@roundup.psfhosted.org>
In-reply-to
Content
> Hm, but there the old parser seems at fault: it points to the last space rather than beyond it?

Both parsers seem to have the same behaviour, when parsing files. I just found out that even the new parser points to the `|` if there is not trailing whitespace:

╰─ cat -e t.py
x = 1 | 2 |$
╰─ ./python.exe t.py
  File "/Users/lysnikolaou/Repositories/cpython/t.py", line 1
    x = 1 | 2 |
              ^
SyntaxError: invalid syntax
╰─ ./python.exe -X oldparser t.py
  File "/Users/lysnikolaou/Repositories/cpython/t.py", line 1
    x = 1 | 2 |
              ^
SyntaxError: invalid syntax

I'll investigate more tomorrow.
History
Date User Action Args
2020-05-08 00:56:28lys.nikolaousetrecipients: + lys.nikolaou, gvanrossum, pablogsal, BTaskaya
2020-05-08 00:56:28lys.nikolaousetmessageid: <1588899388.95.0.62296080683.issue40546@roundup.psfhosted.org>
2020-05-08 00:56:28lys.nikolaoulinkissue40546 messages
2020-05-08 00:56:28lys.nikolaoucreate