[Edu-sig] The fate of raw_input() in Python 3000
Andre Roberge
andre.roberge at gmail.com
Wed Sep 13 03:29:48 CEST 2006
Hi all,
I was going to do like John Zelle, and stop contributing to this
point, but I have a lot less discipline than he does.
A while ago, out of curiosity I bought "Python programming for the
absolute beginner" by Michael Dawson to see his approach as it is
considered an extremely newbie-friendly way to teach programming in
general and programming with Python in particular. Mindful of
copyright breaches (hey, I recommend the book!), I think I can safely
reproduce his first example in its entirety here:
===============
# Game Over
# Demonstrates the print command
# Michael Dawson - 12/26/02
print "Game Over"
raw_input("\n\nPress the enter key to exit.")
==========================
That's it. Dawson builds from this simple example, making better and
better use of raw_input() as he goes along. Everything is built from
extremely simple input/output like others have described: print gives
info *to* the user, raw_input() sends information *from* the user to
the program. Two core built-in commands, simple to explain, to which
other instructions can be added to create more complex programs.
I would really like to hear about Dawson's opinion on the removal of
raw_input() from Python built-ins... I think that Dawson's book
contributes a lot to the stated goals of CP4E.
I would also be curious to hear the opinion of those involved in the
writing/editing of "How to think like a computer scientist" regarding
the same topic... raw_input() is used a lot there too...
To the "Kirby"s out there, I am *very aware* that there are other
approaches to teach programming/Python. For those that doubt this,
have a look at rur-ple (rur-ple.sourceforge.net), a Python Learning
Environment I designed based on "Karel the robot" type of approach.
In addition to designing the environment, I have written 49 lessons so
far ... NONE of which uses/introduces raw_input(): it is simply not
required using a graphical environment like rur-ple. By the time I
might need to introduce it (if only for completeness), learners will
already be familiar with import, functions, etc., so that a
user-defined raw_input() could be easily introduced instead.
Yet, I think it is a mistake to remove it (as I have stated before).
To those that disagree, I would ask: how do you propose in concrete
terms (not pie-in-the-sky) to replace Zelle`s book, Dawson's book and
How to think like a computer scientist, once raw_input() has
disappeared from Python built-ins? Where`s the textbook?
André
More information about the Edu-sig
mailing list