Commit 0fd55764 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.

parent f47036c1
......@@ -1381,6 +1381,9 @@ class PseudoInputFile(PseudoFile):
line = self._line_buffer or self.shell.readline()
if size < 0:
size = len(line)
eol = line.find('\n', 0, size)
if eol >= 0:
size = eol + 1
self._line_buffer = line[size:]
return line[:size]
......
......@@ -169,6 +169,8 @@ Library
IDLE
----
- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
- Issue #19481: print() of string subclass instance in IDLE no longer hangs.
- Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment