[Edu-sig] The fate of raw_input() in Python 3000
Toby Donaldson
tjd at sfu.ca
Tue Sep 5 06:03:35 CEST 2006
> The following is something I have been pondering for quite a while now
> and am wondering what other people on this list think.
>
> According to PEP 3100
> (http://www.python.org/dev/peps/pep-3100/ )
> raw_input() [as well as input()] is recommended for removal from the
> built-in namespace, to be replaced by sys.stdin.readline().
Let me add my voice to the chorus: removing raw_input() hurts
beginners, and, for beginners, it is far preferable than the proposed
alternative, which is cryptic and overly specific.
I saw Guido's Python 3000 talk at the Vancouver Python Workshop this
summer, and I am pretty sure he did not mention this (it was on my
mind --- I had read the PEP earlier). I
If raw_input were removed, then I expect we would see what happened in
the Java world in the early days: every teacher and textbook uses
their own home-rolled simple IO package. I hope Python 3000 does not
repeat Java's mistake!
I don't care about "input". Its there now and hasn't ever been useful
to me (eval(raw_input("...")) is a fine alternative), and, more
importantly, has apparently not caused confusion among students.
Toby
--
Dr. Toby Donaldson
School of Computing Science
Simon Fraser University (Surrey)
More information about the Edu-sig
mailing list