LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Python for Beginners / 2.x vs 3.0 ? (https://www.linuxquestions.org/questions/programming-9/python-for-beginners-2-x-vs-3-0-a-749998/)

euripides 08-24-2009 09:43 PM

Python for Beginners / 2.x vs 3.0 ?
 
Hi folks,

I'm learning python with my son. He's done some basic stuff with MIT's 'Scratch', and I've played about with BASIC, HTML and cut'n'pasting other people's javascript, so newbies but not totally clueless.

I found the excellent 'Snake Wrangling' PDF guide to 3.0, however I'd like a paper book.

'Hello World' looked promising, but it's for python 2.5 or whatever number the previous version was, as is 'Dive into Python'. I think at this point it's better to get straight into 3.0 so there's not more changes to learn down the track, as by the time he's into serious programming python will have moved forwards not backwards, right? I know the differences are small but to me it seems to make more sense to use the latest version unless you suggest a good reason to go back to the earlier one.

I checked out some of the more adult oriented books from O'Reilly and they had mixed reviews.

Swaroop CH's 'A Byte of Python' also seems pretty good although it's a little bit wordy at times. So far Snake Wrangling seems to be the most idiot-proof. (what was that I said about clueless?....)

Any suggestions/advice re hard copy python tutorials and references much appreciated!

pixellany 08-24-2009 10:21 PM

I have "Learning Python" from O'Reilly. My difficulties with Python are not the book's fault....:)

I'm not sure why v 2.X vs. v. 3.X should make a difference for a beginner----Aren't the basics the same?

euripides 08-24-2009 11:02 PM

Quote:

Originally Posted by pixellany (Post 3656255)
I have "Learning Python" from O'Reilly. My difficulties with Python are not the book's fault....:)

I'm not sure why v 2.X vs. v. 3.X should make a difference for a beginner----Aren't the basics the same?


I think the basics might be the same overall, but the very first 'hello world' threw me because the text is now in brackets, whereas before it used to not have brackets. I think this means it is handling the print text differently, I haven't learned enough to know yet.

Small things like that can make a big difference and I don't want to confuse him - he's smart but once he learns something, he's kind of definite about it - changes can be disorienting, and need to know that any errors are our mistakes and not a change in the syntax. I spent ages trying to figure out why print"hello world" wouldn't work the way it was supposed to! I didn't know there'd been a new edition.

Also stuff like having to change directories to run something, or whatever, needs to be stated - very often with 'not quite beginner' things, they assume knowledge. (for example, I didn't know that a compiler isn't installed automatically in linux. Even though the first thing you (used to) have to do is compile some downloaded driver or something. Eventually I found out, after an half an hour of googling!)


All times are GMT -5. The time now is 03:18 PM.