Message367691
> If it's all handled by the tokenizer, how come it's different in the newparser?
Is not different in the new parser: both parsers have analogous behaviour now:
~/github/python/master master
❯ ./python
Python 3.9.0a6+ (heads/master:84724dd239, Apr 29 2020, 20:26:52)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
File "<stdin>", line 1
norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
^
SyntaxError: invalid string prefix
>>>
~/github/python/master master
❯ ./python -X oldparser
Python 3.9.0a6+ (heads/master:84724dd239, Apr 29 2020, 20:26:52)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
File "<stdin>", line 1
norm=lambda m: m+(m and(m[-1]!='\n'and'\n'or'')or'\n')
^
SyntaxError: invalid string prefix
This issue is exclusively due to the changes in https://github.com/python/cpython/pull/19476 if I understand correctly. |
|
Date |
User |
Action |
Args |
2020-04-29 19:28:54 | pablogsal | set | recipients:
+ pablogsal, gvanrossum, vstinner, eric.smith, petr.viktorin, serhiy.storchaka, lys.nikolaou, aeros |
2020-04-29 19:28:54 | pablogsal | set | messageid: <1588188534.37.0.260796378598.issue40246@roundup.psfhosted.org> |
2020-04-29 19:28:54 | pablogsal | link | issue40246 messages |
2020-04-29 19:28:54 | pablogsal | create | |
|