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?
This commit is contained in:
Guido van Rossum 2008-01-02 02:55:27 +00:00
parent cfb83330ce
commit 83210b9ea0

View file

@ -253,13 +253,12 @@ class InteractiveConsole(InteractiveInterpreter):
The returned line does not include the trailing newline. The returned line does not include the trailing newline.
When the user enters the EOF key sequence, EOFError is raised. When the user enters the EOF key sequence, EOFError is raised.
The base implementation uses sys.stdin.readline(); a subclass The base implementation uses the built-in function
may replace this with a different implementation. input(); a subclass may replace this with a different
implementation.
""" """
sys.stdout.write(prompt) return input(prompt)
sys.stdout.flush()
return sys.stdin.readline()