[Python-3000] Pre-PEP: Simple input built-in in Python 3000 (original) (raw)
Tony Lownds tony at PageDNA.com
Fri Dec 22 18:51:20 CET 2006
- Previous message: [Python-3000] Pre-PEP: Simple input built-in in Python 3000
- Next message: [Python-3000] Pre-PEP: Simple input built-in in Python 3000
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Dec 22, 2006, at 5:45 AM, Andre Roberge wrote:
rawinput() provides a simple mean to ask a question and obtain a response from a user. The proposed plans for Python 3.0 would require the replacement of the single statement
name = rawinput("What is your name?") by the more complicated import sys print("What is your name?") same = sys.stdin.readline()
It is even more complicated:
import sys print("What is your name?", end='') name = sys.stdin.readline().strip('\r\n')
Another reason that sys.stdin.readline() is not quite as good as
raw_input is the
fact that it does not use readline.
+1 from me, I've missed raw_input() while playing with the p3yk
branch already.
-Tony
- Previous message: [Python-3000] Pre-PEP: Simple input built-in in Python 3000
- Next message: [Python-3000] Pre-PEP: Simple input built-in in Python 3000
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]