[New-bugs-announce] [issue34055] IDLE inserts extra blank line in prompt after SyntaxError
Grant Jenks
report at bugs.python.org
Thu Jul 5 15:05:33 EDT 2018
New submission from Grant Jenks <grant.jenks at gmail.com>:
IDLE inserts an extra blank line after the prompt after encountering a SyntaxError:
```
>>> 1 + 2
3
>>> print('Hello')
Hello
v-- Missing single quote!
>>> d = {1: 'uno', 2: 'dos', 3: 'tres}
SyntaxError: EOL while scanning string literal
>>> print('Hello')
<-- Extra blank line and whitespace (tab and space).
Hello
>>> 1 + 2
<-- Extra blank line and whitespace (tab and space).
3
>>>
```
Notice the line starting with ">>> d =" above contains a missing single quote which causes a "SyntaxError: EOL while scanning string literal". This causes IDLE to insert extra blank lines with one tab and one space after every input.
The old behavior looked like:
```
>>> 1 + 2
3
>>> print('Hello')
Hello
>>> d = {1: 'uno', 2: 'dos', 3: 'tres}
SyntaxError: EOL while scanning string literal
>>> print('Hello')
Hello
>>> 1 + 2
3
```
----------
assignee: terry.reedy
components: IDLE
messages: 321126
nosy: grantjenks, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE inserts extra blank line in prompt after SyntaxError
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34055>
_______________________________________
More information about the New-bugs-announce
mailing list