What's interesting is that according to the author Mark Pilgrim:<p><pre><code> 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.
</code></pre>
<a href="http://www.reddit.com/r/IAmA/comments/f545e/i_am_a_fourtime_published_author_i_write_free/c1dcgsm" rel="nofollow">http://www.reddit.com/r/IAmA/comments/f545e/i_am_a_fourtime_...</a>
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.<p>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?<p><pre><code> Many of its major features have also been backported to the backwards-compatible
Python 2.6 and 2.7. [1]
</code></pre>
[1] <a href="http://en.wikipedia.org/wiki/History_of_Python" rel="nofollow">http://en.wikipedia.org/wiki/History_of_Python</a>
People may complain all they want about the overall book or even Python 3 in general, but the chapter about strings (<a href="http://diveintopython3.org/strings.html" rel="nofollow">http://diveintopython3.org/strings.html</a>) 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.<p>Of course a lot of the chapter is python 3 specific, but IMHO p3's handling of strings and encodings is very well done.<p>Provided that the strings you are going to deal with can be represented in Unicode, which still isn't always the case: <a href="http://en.wikipedia.org/wiki/Han_unification#Rationale_and_controversy" rel="nofollow">http://en.wikipedia.org/wiki/Han_unification#Rationale_and_c...</a>
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.<p>I learned quite a few cool Python tricks from DiP and it was the first book that got me <i>excited</i> 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.
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.<p>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.
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 (<a href="http://www.doughellmann.com/PyMOTW/" rel="nofollow">http://www.doughellmann.com/PyMOTW/</a>). 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.<p>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).
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.<p>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.
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.