[New-bugs-announce] [issue43402] IDLE shell adds newline after print even when `end=''` is specificied

Hugo Nobrega report at bugs.python.org
Thu Mar 4 13:14:22 EST 2021


New submission from Hugo Nobrega <hugonobrega at dcc.ufrj.br>:

When evaluting a call to the `print` function with argument `end=''` in the IDLE shell, a newline is unexpectedly added at the end, before the next shell prompt.

The expected behavior is to have the shell prompt next to the last printed line. The expected behavior is seen when evaluting the same expression in an interactive python shell from a terminal (`python -i`)

Example:

IDLE shell (not expected):
>>> print('a',end='')
a
>>> 

Interactive python shell (expected): 
>>> print('a',end='')
a>>>

I could not find any settings in IDLE that might be governing this behavior, not any other issues mentioning this same thing.


Tested on Python 3.9.1 on Manjaro Linux.

----------
assignee: terry.reedy
components: IDLE
messages: 388115
nosy: hugonobrega, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE shell adds newline after print even when `end=''` is specificied
type: behavior
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43402>
_______________________________________


More information about the New-bugs-announce mailing list