Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c086c0

Browse files
committed
Get rid of raw_input() emulation, use its reincarnation as input().
See Issue 1707.
1 parent 83210b9 commit 7c086c0

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Lib/pydoc.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,11 +1532,6 @@ def writedocs(dir, pkgpath='', done=None):
15321532
writedoc(modname)
15331533
return
15341534

1535-
def raw_input(prompt):
1536-
sys.stdout.write(prompt)
1537-
sys.stdout.flush()
1538-
return sys.stdin.readline()
1539-
15401535
class Helper:
15411536
keywords = {
15421537
'and': 'BOOLEAN',
@@ -1706,9 +1701,9 @@ def interact(self):
17061701
self.help(request)
17071702

17081703
def getline(self, prompt):
1709-
"""Read one line, using raw_input when available."""
1704+
"""Read one line, using input() when appropriate."""
17101705
if self.input is sys.stdin:
1711-
return raw_input(prompt)
1706+
return input(prompt)
17121707
else:
17131708
self.output.write(prompt)
17141709
self.output.flush()

0 commit comments

Comments
 (0)