Message376048
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. |
|
| Date |
User |
Action |
Args |
| 2020-08-28 21:43:15 | gvanrossum | set | recipients:
+ gvanrossum, lys.nikolaou |
| 2020-08-28 21:43:15 | gvanrossum | set | messageid: <1598650995.75.0.684602655166.issue41659@roundup.psfhosted.org> |
| 2020-08-28 21:43:15 | gvanrossum | link | issue41659 messages |
| 2020-08-28 21:43:15 | gvanrossum | create | |
|