Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
This commit is contained in:
commit
a7a4b4916f
|
@ -1384,6 +1384,9 @@ class PseudoInputFile(PseudoFile):
|
||||||
line = self._line_buffer or self.shell.readline()
|
line = self._line_buffer or self.shell.readline()
|
||||||
if size < 0:
|
if size < 0:
|
||||||
size = len(line)
|
size = len(line)
|
||||||
|
eol = line.find('\n', 0, size)
|
||||||
|
if eol >= 0:
|
||||||
|
size = eol + 1
|
||||||
self._line_buffer = line[size:]
|
self._line_buffer = line[size:]
|
||||||
return line[:size]
|
return line[:size]
|
||||||
|
|
||||||
|
|
|
@ -240,6 +240,8 @@ Library
|
||||||
IDLE
|
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 #19481: print() of string subclass instance in IDLE no longer hangs.
|
||||||
|
|
||||||
- Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial
|
- Issue #18270: Prevent possible IDLE AttributeError on OS X when no initial
|
||||||
|
|
Loading…
Reference in New Issue