Learning Python

A

Alex Martelli

Byte said:
Thanks, never knew that, but they are using raw_input as a stack,
aren't they?

No. raw_input is a function object, "using it as a stack" is a rather
meaningless phrase. You can use a list as a stack, but that's totally
and absolutely unrelated to that spot in the tutorial.


Alex
 
B

Blair P. Houghton

Xavier said:
Where the hell did you get the idea of stacking input on a raw_input in
the first place?

I'm guessing it goes something like: "input is a verb, but raw_input
is a noun, so raw_input looks like a cast or conversion or stream
constructor, and input looks like an action..."

raw_input is a bad name for get_interactive_input, anyway...

--Blair
 
S

Steve Holden

Xavier said:
It is simple, merely explicit and with some details.

It seemed to me a bit like an attempt to save a drowning man by opening
a firehose on his mouth :)

regards
Steve
 
R

Ron Rogers Jr.

Byte said:
Yes, sorry, didnt realise diffrence between int and input. Since i'm
such an idiot at this, any links to sites for people who need an
unessicerily gentle learning curve?

I'm new to Python too, here's a few I've found useful:

http://www.greenteapress.com/thinkpython/

http://wiki.python.org/moin/BeginnersGuide/NonProgrammers

Python Programming for the Absolute Beginner by Michael Dawson. It is
the book I'm using. It's different from other Python books in that it's
examples/sample programs are games or game related. The author uses a
modified version of the LiveWires modules later in the book along side
Pygame

http://www.amazon.com/gp/product/1598631128/002-1529099-9424031?v=glance&n=283155

(That's the second edtion, no reviews yet.)

http://www.amazon.com/gp/product/1592000738/002-1529099-9424031?v=glance&n=283155

(first edition with reviews)

LiveWires they've got materials to go with their modules.

http://www.livewires.org.uk/python/

You haven't mentioned using IDLE, the built in IDE, I have found it useful:

http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html

It might not be in your menus though, on my box it's at:

python2.4 /usr/local/lib/python2.4/idlelib/idle.py


CronoCloud (Ron Rogers Jr.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,367
Latest member
Monarch

Latest Threads

Top