Message395214
Spinoff from #38673, about standard REPL, msg356271 (me) and msg356348 (Guido). In the following interactions, no blank lines were entered.
3.9 behavior
>>> #a
>>> # a
>>> #a
>>> # a
>>>
Mystery 1: why the blank continuation line?
I previously wrote
"ast.dump(ast.parse(' # a\n', '', 'single')) gives the same result, 'Module(body=[], type_ignores=[])', as without [space after #]".
Today, 3.8.10, 3.9.5, 3.10, and 3.11 say "unexpected EOF while parsing".
3.10 behavior
>>> #a
...
>>> # a
>>> #a
>>> # a
...
>>>
Mystery 2: why the new continuation line after '#a'?
3.11 behavior
>>> #a
>>> # a
>>> #a
>>> #a
>>> # a
...
>>>
Mystery 3: why does the 3.10 regression for '#a' disappear?
Perhaps IDLE should handle initial blank lines itself, but I will investigate what codeop._maybe_compile is getting and doing in the different cases first. |
|
Date |
User |
Action |
Args |
2021-06-06 20:44:50 | terry.reedy | set | recipients:
+ terry.reedy, taleinat |
2021-06-06 20:44:50 | terry.reedy | set | messageid: <1623012290.47.0.522226397666.issue44325@roundup.psfhosted.org> |
2021-06-06 20:44:50 | terry.reedy | link | issue44325 messages |
2021-06-06 20:44:50 | terry.reedy | create | |
|