[issue34055] IDLE: erroneous 'smart' indents in shell
Terry J. Reedy
report at bugs.python.org
Sat Dec 29 01:00:16 EST 2018
Terry J. Reedy <tjreedy at udel.edu> added the comment:
Even before this fix, in 3.7.2, I no longer see the extra blank lines I reported in msg321135 either on Windows or macOS. I did still see the persistent and expanding indents reported in the opening post. I believe that this is what Raymond also referred to. The one I could reproduce are now gone. Hence, I close this.
Remaining newline and indent issues should be handled in other issues.
* I intend to review the initial PR for #32989 soon. I don't know what its effect might be on the user-visible result.
* Too short indents for open fences needs a new issue.
* Blank line before SyntaxError: interactive python does this.
>>> d={a:'a}
File "<stdin>", line 1
d={a:'a}
^
SyntaxError: EOL while scanning string literal
>>>
The ^ line is nearly blank. IDLE omits the line echo and ^ and adds a red highlight instead ... + an invisible indent on the next line (now too short). (It also color-codes the error message.)
>>> d={a:'a}<---red highlight to end of line...
SyntaxError: EOL while scanning string literal
>>>
Checking syntax first and skipping indent on error would give the following. I don't know how easy this would be.
>>> d={a:'a}<---red highlight to end of line...
SyntaxError: EOL while scanning string literal
>>>
----------
dependencies: -IDLE: Fix pyparse.find_good_parse_start and its bad editor call
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34055>
_______________________________________
More information about the Python-bugs-list
mailing list