[issue29561] Interactive mode gives sys.ps2 not sys.ps1 after comment-only line

2021-03-04 Thread Eryk Sun
Eryk Sun added the comment: The is fixed in 3.7+. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29561] Interactive mode gives sys.ps2 not sys.ps1 after comment-only line

2017-02-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: If src is effectively blank, compile(src, filename, mode) raises SyntaxError if mode is 'single' but not if it is 'exec'. I believe IDLE compiles with 'single', but it has the behavior Jim (and I) expect and consider correct, printing '>>>' after effectively

[issue29561] Interactive mode gives sys.ps2 not sys.ps1 after comment-only line

2017-02-15 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: Thank you for the analysis, Eryk Sun. You wrote, "the interpreter is correctly conveying that it's still tokenizing the input; it hasn't compiled or executed any code." I think one important question for this issue is, what meaning should the choice of prompt

[issue29561] Interactive mode gives sys.ps2 not sys.ps1 after comment-only line

2017-02-14 Thread Eryk Sun
Eryk Sun added the comment: For the tokenizer, a blank line is "[a] logical line that contains only spaces, tabs, formfeeds and possibly a comment" [1]. A blank line is normally ignored, except in the REPL an entirely blank line (i.e. no whitespace or comment) is used to end a multi-line

[issue29561] Interactive mode gives sys.ps2 not sys.ps1 after comment-only line

2017-02-14 Thread Jim DeLaHunt
New submission from Jim DeLaHunt: When you run the Python interpreter in interactive mode, get a sys.ps1 prompt (`...`), and type a comment-only or white-space-only line, the interpreter responds with a sys.ps2 prompt (`...`), instead of a sys.ps1 prompt. This seems wrong. For example: %