Message368393
> But if the col_offset points way past the text, what should happen? The clipping there seems reasonable.
Note that if a file is being parsed and not a string the behaviour is this:
╰─ cat -e t.py
x = 1 | 2 | $
╰─ ./python.exe t.py
File "/Users/lysnikolaou/repos/cpython/t.py", line 1
x = 1 | 2 |
^
SyntaxError: invalid syntax
╰─ ./python.exe -X oldparser t.py
File "/Users/lysnikolaou/repos/cpython/t.py", line 1
x = 1 | 2 |
^
SyntaxError: invalid syntax
Would we want to also change this? If not, then I guess that we should as closely as possible match this behaviour with strings as well, which means not clipping. |
|
Date |
User |
Action |
Args |
2020-05-07 23:53:42 | lys.nikolaou | set | recipients:
+ lys.nikolaou, gvanrossum, pablogsal, BTaskaya |
2020-05-07 23:53:42 | lys.nikolaou | set | messageid: <1588895622.03.0.435436260208.issue40546@roundup.psfhosted.org> |
2020-05-07 23:53:42 | lys.nikolaou | link | issue40546 messages |
2020-05-07 23:53:41 | lys.nikolaou | create | |
|