diff options
author | Guido van Rossum <guido@python.org> | 2008-01-02 02:55:27 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2008-01-02 02:55:27 +0000 |
commit | 0d4ef19d2119cb06436d4e38de6342bca632a7c8 (patch) | |
tree | 21cd7ec07a4166a79046409a6944d0ca1538ad52 /Lib/code.py | |
parent | b5a545c41d10df087119c66e1954539b969f30e8 (diff) | |
download | cpython-0d4ef19d2119cb06436d4e38de6342bca632a7c8.tar.gz |
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?
Diffstat (limited to 'Lib/code.py')
-rw-r--r-- | Lib/code.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/code.py b/Lib/code.py index 58af88390a..8962927d71 100644 --- a/Lib/code.py +++ b/Lib/code.py @@ -253,13 +253,12 @@ class InteractiveConsole(InteractiveInterpreter): The returned line does not include the trailing newline. When the user enters the EOF key sequence, EOFError is raised. - The base implementation uses sys.stdin.readline(); a subclass - may replace this with a different implementation. + The base implementation uses the built-in function + input(); a subclass may replace this with a different + implementation. """ - sys.stdout.write(prompt) - sys.stdout.flush() - return sys.stdin.readline() + return input(prompt) |