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

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

parent b712873a
......@@ -1393,6 +1393,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]
......
......@@ -118,6 +118,8 @@ Library
IDLE
----
- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
- Issue #19481: print() of unicode, str or bytearray subclass instance in IDLE
no more hangs.
......
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