Message386622
#43151 asked about 'is <literal>' syntax warnings in REPL. Discussion noted that IDLE Shell does note print it for "x is 'a'" (known here) and that for "if x is 'a': print('executed')" there is a syntax error and no execution. The conversion to SyntaxError was supposedly fixed by PR-15500, but it appears that the patch for #40807 introduced it into codeop._maybe_compile.
msg386621 has summary and discussion. I need to add debug prints or breakpoints into _maybe_compile to understand it better, and maybe improve it.
Before printing syntax warnings in Shell, I want to stop expanding them from 1 to 4 lines. We could just not import the replacement from run.py, but I think the default format could be improved even with 1 or 2 lines. |
|
Date |
User |
Action |
Args |
2021-02-08 08:38:45 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, taleinat, serhiy.storchaka, cheryl.sabella, miss-islington |
2021-02-08 08:38:45 | terry.reedy | set | messageid: <1612773525.69.0.16663742445.issue37824@roundup.psfhosted.org> |
2021-02-08 08:38:44 | terry.reedy | link | issue37824 messages |
2021-02-08 08:38:44 | terry.reedy | create | |
|