FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix issue #1707. When raw_input() was removed, it was incorrectly re… · python/cpython@83210b9 · GitHub

Repository navigation

Commit 83210b9

Browse files
committed
Fix issue #1707. When raw_input() was removed, it was incorrectly replaced
with sys.stdin.readline(). I wonder how many other places are affected by the same bug?
1 parent cfb8333 commit 83210b9

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎Lib/code.py‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,12 @@ def raw_input(self, prompt=""):
253253
The returned line does not include the trailing newline.
254254
When the user enters the EOF key sequence, EOFError is raised.
255255
256-
The base implementation uses sys.stdin.readline(); a subclass
257-
may replace this with a different implementation.
256+
The base implementation uses the built-in function
257+
input(); a subclass may replace this with a different
258+
implementation.
258259
259260
"""
260-
sys.stdout.write(prompt)
261-
sys.stdout.flush()
262-
return sys.stdin.readline()
261+
return input(prompt)
263262

264263

265264

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL