Commit 7c086c00 authored by Guido van Rossum's avatar Guido van Rossum

Get rid of raw_input() emulation, use its reincarnation as input().

See Issue 1707.
parent 83210b9e
...@@ -1532,11 +1532,6 @@ def writedocs(dir, pkgpath='', done=None): ...@@ -1532,11 +1532,6 @@ def writedocs(dir, pkgpath='', done=None):
writedoc(modname) writedoc(modname)
return return
def raw_input(prompt):
sys.stdout.write(prompt)
sys.stdout.flush()
return sys.stdin.readline()
class Helper: class Helper:
keywords = { keywords = {
'and': 'BOOLEAN', 'and': 'BOOLEAN',
...@@ -1706,9 +1701,9 @@ has the same effect as typing a particular string at the help> prompt. ...@@ -1706,9 +1701,9 @@ has the same effect as typing a particular string at the help> prompt.
self.help(request) self.help(request)
def getline(self, prompt): def getline(self, prompt):
"""Read one line, using raw_input when available.""" """Read one line, using input() when appropriate."""
if self.input is sys.stdin: if self.input is sys.stdin:
return raw_input(prompt) return input(prompt)
else: else:
self.output.write(prompt) self.output.write(prompt)
self.output.flush() self.output.flush()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment