

Dive Into Python 3 (online book) - helwr
http://diveintopython3.org/

======
kqr2
What's interesting is that according to the author Mark Pilgrim:

    
    
      Python 3 is a commercial disaster. In 2010Q3 I had 
      negative sales of DiP3. More people returned it than 
      bought it. I'm considering retro-fitting the book's 
      content to Python 2.7 and re-releasing it as "Dive Into 
      Python 2." Seriously.
    

[http://www.reddit.com/r/IAmA/comments/f545e/i_am_a_fourtime_...](http://www.reddit.com/r/IAmA/comments/f545e/i_am_a_fourtime_published_author_i_write_free/c1dcgsm)

~~~
MostAwesomeDude
DiP3 is not a very good book. (Neither was DiP.) I don't know how relevant
that is to sales, though, but considering that some of the bigger Python
groups actively recommend against it, I wouldn't be surprised if there was an
impact on sales from that alone.

Edit: I don't recommend learning Python from a book. I recommend
<http://docs.python.org/tutorial/> if you know a programming language already,
or <http://learnpythonthehardway.org/> if you don't. (Yes, I know there are
dead-trees of both of these.)

~~~
fraXis
What Python book do you recommend for someone who wants to start learning the
language? Thanks.

~~~
RyanMcGreal
Learn Python The Hard Way.

~~~
c4m
Does it cover Python 3? I cannot tell from reading
<http://learnpythonthehardway.org/> \- maybe I missed something.

~~~
SkyMarshal
Heh, not exactly:

 _"A programmer may try to get you to install Python 3 and learn that. You
should tell them, "When all of the python code on your computer is Python 3,
then I'll try to learn it." That should keep them busy for about 10 years."_

<http://learnpythonthehardway.org/book/ex0.html> (under Warnings for
Beginners)

~~~
c4m
Is that actually good advice?

~~~
selectnull
Yes, that is a good advice.

Someone wanting to learn Python (or any other language) will be better served
if they are helped to focus at most important and least painful things first:
in this case, python 2 is everywhere with huge number of libraries. Whatever
you need is 'pip install' away.

Learning Python 2 is not a waste of time: whatever you learn and is changed in
Python 3, will be easily relearned once it becomes needed.

------
enterneo
I just ordered DIP3 yesterday, after having finished DIP. Since the original
DIP was based on v2.33 I am currently missing a lot of new features:
decorators, descriptors, meta classes, dictionary and set comprehensions et
al. DIP was awesome! and I think I have learned a lot from Mark's pragmatic
conversational style.

Regarding DIP3. As someone pointed out that the new book has not gained much
traction since its release in late 2009. But I have a feeling this might have
changed now with v2.7 release with which most of the v3 features have been
back ported to 2.x already and I am wondering if it's actually safe to read
this book while using v2.7.2?

    
    
        Many of its major features have also been backported to the backwards-compatible 
        Python 2.6 and 2.7. [1]
    

[1] <http://en.wikipedia.org/wiki/History_of_Python>

------
pilif
People may complain all they want about the overall book or even Python 3 in
general, but the chapter about strings
(<http://diveintopython3.org/strings.html>) is amazingly good and will help
you understand a lot about encodings, internal string representation and how
to read/write strings to the outside world.

Of course a lot of the chapter is python 3 specific, but IMHO p3's handling of
strings and encodings is very well done.

Provided that the strings you are going to deal with can be represented in
Unicode, which still isn't always the case:
[http://en.wikipedia.org/wiki/Han_unification#Rationale_and_c...](http://en.wikipedia.org/wiki/Han_unification#Rationale_and_controversy)

------
swanson
For all the criticisms that DiP gets, it is still the best formatted online
book I've come across. The line number/hover over highlight thing is awesome.
The code examples are interesting. The explanations are in-depth without
spending 10 pages holding your hand.

I learned quite a few cool Python tricks from DiP and it was the first book
that got me _excited_ about programming. I remember reading the chapter on
list comprehensions and thinking they were the coolest thing ever (and I still
love 'em!). Whether or not all the code is 'pythonic' or uses deprecated
methods, it was still worth reading in my mind.

------
frewsxcv
I'm curious why people consider DiP to be a bad book? I personally can't
defend it since I haven't read it

~~~
Luyt
_"This book is so full of bad initial examples and difficult to follow
instructions that it actually hurts Python to have it exist. When beginners
stumble onto it they end up getting discouraged and go on to another language.
I personally have had too many friends who are eager to learn programming find
this festering dung pile before I could warn them and get turned off from
programming."_ \- Zed Shaw

~~~
enterneo
I do not agree. In fact, the insanely cool examples are what makes this book
worth reading. This book is not for beginners but for programmers who have
experience in some other language and are curious to know why python might be
a better choice for them as their next high level language.

------
douglasputnam
DiP3 is a good book, if you are already familiar with Python. It's not for
newbies. In fact, when I didn't know Python I disliked DiP3 to the point of
making rude and ignorant comments about it on public forums. Now that I have a
humble portion of Python, I like the book and refer to it often. Mark Pilgrim
has an engaging style, too. I always appreciate a little style.

If you are looking for an intro book, go with Zed Shaw's "Learn Python the
Hard Way." There's another guy with lots of style.

------
windexh8er
I'm surprised nobody has mentioned Doug Hellman's great resources. His book
"The Python Standard Library by Example" is basically a print version of his
PyMOTW project (<http://www.doughellmann.com/PyMOTW/>). While not an end to
end "learn Python" the examples, at least in my case, have led me to ask quite
a few questions that open other doors into Python that I haven't been exposed
to.

I like what Zed has put out, but the books Lutz has out are great as well.
Hetland's book is OK and Paul Barry's "Head First Python" is a great read if
you're a true beginner to get your feet wet with a fun book. It's an easy
read, but I would think that the transition to "Learning Python" would feel
like a slight step backwards - however "Programming Python" by Lutz may be a
better logical step (instead of going back through a lot of the basics).

~~~
enterneo
I agree! After finishing DIP, I am looking for a book to introduce me what all
is available in the python standard library.

I could use the official python library [1] but I usually prefer reading away
from the computer and then getting back to get some actual work done; so I am
looking for a dead-tree book.

Currently I am thinking b/w PER [2] or PSL by Example [3]. I see that PER gets
referred to everywhere but that could also be due to the fact that it came out
in 2009 and PSL by Example just came out last month.

On a quick look, it seems PSL by Example gives more of a tutorial feel (which
I think is great!) whereby PER is essentially a reference. What would you
recommend?

[1] <http://docs.python.org/library/>

[2] [http://www.amazon.com/Python-Essential-Reference-David-
Beazl...](http://www.amazon.com/Python-Essential-Reference-David-
Beazley/dp/0672329786)

[3] [http://www.amazon.com/Python-Standard-Library-Example-
Develo...](http://www.amazon.com/Python-Standard-Library-Example-
Developers/dp/0321767349)

------
Bo102010
I have DiP3, and have used it for a couple of tricks, but I found learning
Python through Project Euler + documentation to be much more useful.

Also, having learned Python 3 first, I can't stand porting things to Python 2.
It's like taking a final draft of an idea and trying to turn it into a rough
draft.

------
robjohnson
The Stanford Intro to CS course was the best reference for learning Python
that I used. The companion manual was How to think like a Computer Scientist
and I thought it was just great. I can't speak to the DIP books, but I would
wholeheartedly recommend the references above to anyone I knew.

~~~
AbyCodes
*MIT Intro to CS and Programming

~~~
robjohnson
Yes - thank you :)

