mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
This commit is contained in:
parent
f47036c130
commit
0fd557647d
2 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue