Author terry.reedy
Recipients cheryl.sabella, miss-islington, rhettinger, serhiy.storchaka, taleinat, terry.reedy
Date 2021-02-08.08:38:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612773525.69.0.16663742445.issue37824@roundup.psfhosted.org>
In-reply-to
Content
#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.
History
Date User Action Args
2021-02-08 08:38:45terry.reedysetrecipients: + terry.reedy, rhettinger, taleinat, serhiy.storchaka, cheryl.sabella, miss-islington
2021-02-08 08:38:45terry.reedysetmessageid: <1612773525.69.0.16663742445.issue37824@roundup.psfhosted.org>
2021-02-08 08:38:44terry.reedylinkissue37824 messages
2021-02-08 08:38:44terry.reedycreate