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 gvanrossum
Recipients gvanrossum, lys.nikolaou
Date 2020-08-28.21:43:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1598650995.75.0.684602655166.issue41659@roundup.psfhosted.org>
In-reply-to
Content
I just noticed a subtle discrepancy between the old parser and the PEG parser. Consider this syntax error: ``` if x {a}: pass ``` The old parser places the caret at the '{': ``` $ python3.8 -c 'if x { a } : pass' File "<string>", line 1 if x { a } : pass ^ SyntaxError: invalid syntax ``` The PEG parser puts it at 'a': ``` $ python3.10 -c 'if x { a } : pass' File "<string>", line 1 if x { a } : pass ^ SyntaxError: invalid syntax ``` I don't think we should put much effort into fixing it -- it's just a curiosity. I suspect it's got to do with some lookahead.
History
Date User Action Args
2020-08-28 21:43:15gvanrossumsetrecipients: + gvanrossum, lys.nikolaou
2020-08-28 21:43:15gvanrossumsetmessageid: <1598650995.75.0.684602655166.issue41659@roundup.psfhosted.org>
2020-08-28 21:43:15gvanrossumlinkissue41659 messages
2020-08-28 21:43:15gvanrossumcreate