]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Get rid of raw_input() emulation, use its reincarnation as input().
authorGuido van Rossum <guido@python.org>
Wed, 2 Jan 2008 03:52:38 +0000 (03:52 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 2 Jan 2008 03:52:38 +0000 (03:52 +0000)
See Issue 1707.

Lib/pydoc.py

index d94c3d30dacf884e274100faaa350f97d4dd282a..1bab8e344c64e667231bc7831dc92110adefefae 100755 (executable)
@@ -1532,11 +1532,6 @@ def writedocs(dir, pkgpath='', done=None):
         writedoc(modname)
     return
 
-def raw_input(prompt):
-    sys.stdout.write(prompt)
-    sys.stdout.flush()
-    return sys.stdin.readline()
-
 class Helper:
     keywords = {
         'and': 'BOOLEAN',
@@ -1706,9 +1701,9 @@ has the same effect as typing a particular string at the help> prompt.
             self.help(request)
 
     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:
-            return raw_input(prompt)
+            return input(prompt)
         else:
             self.output.write(prompt)
             self.output.flush()