share
Stack OverflowWhat is the best Python book for experienced programmers?
[+122] [19] VoidPointer
[2009-01-19 14:31:58]
[ python books ]
[ http://stackoverflow.com/questions/457757/what-is-the-best-python-book-for-experienced-programmers ] [DELETED]

I am a fairly experienced programmer, mostly C, C++, Java and C#... Can you recommend any Python books that would help me to get the most out of my existing experience? Many Python books that I have read good reviews about seem to be aimed at the novice programmer - I'd like to find something that "gets right down to business". There are many good resources on the web of course, but I would like to have a real book that possibly goes a bit into detail about specific concepts, techniques and patterns that are specific to Python.

Related questions:

[+43] [2009-01-19 14:32:57] Steve Losh [ACCEPTED]

Dive into Python [1] is a bit outdated but still useful.

[1] http://diveintopython.net/toc/index.html

..and you can't beat the price. I recommend it as well, very nice book and fast paced. - rodbv
I too was looking for a "dead tree" book on Python. I've just finished reading through diveintopython3.org though and have to say it's probably as good or better than most paper books on Python would be (and it looks like a paper version can be purchased if absolutely required). I haven't read any other Python books though, so my experience is somewhat limited. - Bryce Thomas
(1) While I like this book for a brief expository of the language I find that after reading it I have significant gaps in fundamental and technical aspects of the language. I wonder if there is a book like 'The Ruby Programming Language' for Python ... - bias
(5) The above link for "Dive Into Python 3" is dead. It's moved here: diveintopython3.ep.io - Joe White
1
[+27] [2009-01-19 14:41:06] J.F. Sebastian

I'll never tire of recommending Code Like a Pythonista: Idiomatic Python [1].

It is not a book but for experienced programmer it contains more than most books.

[1] http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html

While this is not a book, the approach he takes is great! - VoidPointer
(1) Wow, thanks! I've been looking for something exactly like this. - Bob Somers
2
[+11] [2009-01-19 14:36:18] Galwegian

Python in a Nutshell [1] is a great book too.

[1] http://oreilly.com/catalog/9780596001889/

3
[+11] [2009-01-19 15:19:11] oylenshpeegul

I like Beazley's Python Essential Reference [1] a lot. I have the 3rd edition [2], but apparently the 4th edition [3] will be out soon.

[1] http://www.dabeaz.com/writing.html
[2] http://www.pearsonhighered.com/educator/academic/product/0,3110,0672328623,00.html
[3] http://www.pearsonhighered.com/educator/academic/product/0,3110,0672329786,00.html

This is a fantastic book specifically written for people who can already code. It tell you exactly what you need to know, exposes the weird parts, encourages idiomatic code, and does all of this in supremely comprehensible prose. It's the only book I recommend to the OP's target audience. - Triptych
4
[+8] [2009-01-19 14:44:03] Eddie Parker

I'm not much for fancy book lernin', so I usually stick to the tutorials off the Python website.

Start with the python http://docs.python.org/tutorial/, get as far as you can go without boring yourself, and then just use the library (http://docs.python.org/library/) for reference.

Good luck learning - it's a fantastic language. It's basically pseudocode that's not so pseudo!


The problem with this approach sometimes is that one tends to stick to established patterns and techniques while there might be other ways more suited in the new language. - VoidPointer
True, although you'll find with Python the 'Pythonic' approach is held as the one true way for the most part. The tutorial is very comprehensive too, so I suggest you try it out. - Eddie Parker
If you get tired of the tutorial, try doing things your self, then when you have questions you have stackoverflow and google to help. - monkut
5
[+8] [2009-01-19 14:51:21] John D. Cook

A lot of people recommend Core Python [1]. I haven't ready many other Python books to compare it to, but I think it's well written.

The fellow who hosts the Python 411 podcast [2] says if he were stranded on a desert island with only one Python book, it would be Core Python.

Update: My favorite Python book is now Python Essential Reference [3]. It's pace is more suitable for experienced programmers than that of Core Python. Also, it covers things beyond language syntax that are hard to find in other Python books.

[1] http://rads.stackoverflow.com/amzn/click/0132269937
[2] http://www.awaretek.com/python/
[3] http://rads.stackoverflow.com/amzn/click/0672329786

I don't know, I have this book and first impressions were not good. One of the first examples had some blatant syntax errors which I just happened to be able to recognise. Also I felt it was very chunky (sheer volume), yet quite shallow at the same time. - Wayne Koorts
I don't know about about the errors Wayne might have found, but Core Python is so far the best book on Python I've seen. It goes in very deep on the important subjects, although it might get a bit cryptic for someone learning Python as a first language. In general if you've studied CS and know the general language concepts, then this book is for you. - dguaraglia
6
[+6] [2009-01-19 14:41:26] Martin Beckett

Starting with Python 3 then Programming in Python 3: A Complete Introduction to the Python Language [1] together with Expert Python Programming [2] when you have to start delivering applications (packaging, installers, libraries, etc.)

O'Reilly Programming Python (third edition) is good, but very long, and I am not sure when it is a tutorial and when it is a reference.

[1] http://rads.stackoverflow.com/amzn/click/0137129297
[2] http://rads.stackoverflow.com/amzn/click/184719494X

Programming Python is a long book, but it's well divided into areas, so if you don't want to learn GUI Programming and prefer Network programming, you don't have to. Or viceversa. - Adriano Varoli Piazza
7
[+5] [2009-01-19 20:19:34] Peter Rowell

I sometimes like to graze the Python Cookbook [1] over at ActiveState. It stirs my brain up and makes me think of things in ways I normally wouldn't. Recipes by certain contributors (e.g. Raymond Hettinger [2]) are particularly instructive to study.

[1] http://code.activestate.com/recipes/langs/python/
[2] http://code.activestate.com/recipes/users/178123/

8
[+5] [2009-01-20 01:16:59] monkut

People still read books?

I'd recommend going through a tutorial. When you finish or get tired of it, use Stack Overflow and Google to resolve questions you have about the language as they come up.

Here's the official tutorial:

http://docs.python.org/tutorial/index.html

And official documentation:

http://docs.python.org/

This post is a good introduction to the python way of working.
What tools to use, the packing system, etc:

http://mirnazim.org/writings/python-ecosystem-introduction/


Definitely +1 on the official Python tutorial. It was written originally by Python's creator himself and will probably give you just what you need and you'll be able to supplement that well with a combination of the official docs (very comprehensive) and Stack Overflow. - Wayne Koorts
(1) When you don't want to spend more hours in front of a screen you can get relaxed readig a book in the open air. - skan
If your trying to learn to program, especially python, you should probably be in front of a computer anyway. The command line interpreter is invaluable when learning. - monkut
9
[+4] [2009-01-19 14:41:33] Patrick Harrington

Always been a fan of A Byte of Python [1] - made for both new and experienced programmers.

[1] http://www.swaroopch.com/notes/Python

10
[+4] [2009-01-19 15:18:15] hyperboreean

You could take a look at the fresh Expert_Python_Programming [1] or Programming_Python [2] does a very good job.

[1] http://www.packtpub.com/expert-python-programming/book
[2] http://rads.stackoverflow.com/amzn/click/0596009259

(1) Expert Python Programming is a horrible book that has only received favorable attention due to the publisher spamming virtually every tech blog and tech site with fake blog posts. It's disgusting. Do not but it! - Tristan
@Tristan, why say this, maybe there is a lot of blog talk this book, but I do recommend this. I read it page by page and I like it, maybe it's not for the Other language experienced programmers, I think it's the book for Python programmers - sunqiang
11
[+3] [2009-01-20 00:17:41] Jonik

Coming from Java (and occasional Bash scripting), and learning how to do basic stuff in Python a while back, I had two books available to me at work:

  1. Python in a Nutshell [1] (Bought at my suggestion, because after comparing Python books online I thought this would be just what I needed)
  2. Learning Python [2] (Linking to latest edition, but I think we had the 1st ed)

Unexpectedly, I found myself more frequently using Learning Python, even though it seems much more like it's "aimed at the novice programmer"; something I was not, really. I just noticed I found the basic syntax stuff and examples I needed faster in that book.

Just my 2 cents about these 2 books. :) It may well be that Programming Python [3] or some such is what you need.

[1] http://oreilly.com/catalog/9780596100469/
[2] http://oreilly.com/catalog/9780596513986/
[3] http://oreilly.com/catalog/9780596009250/index.html

12
[+3] [2011-11-29 21:37:41] Jan Delany

Have a look at Programming Collective Intelligence: Building Smart Web 2.0 Applications [1]. It is great for web scraping and data mining using Python

[1] http://rads.stackoverflow.com/amzn/click/0596529325

13
[+2] [2011-08-03 13:28:56] Vaibhav Bajpai

Dive into Python 3 → Pro Python

enter image description here


2nd link is dead - Tshepang
I couldn't find the new link, so I removed them. - Vaibhav Bajpai
14
[+1] [2009-01-19 14:53:04] user35978

I guess what you are looking for is more a syntactic book that will tell you how to do something you already understand. The best I can recommend for this is a small tutorial on the Internet. Something like Advanced Python will get you to the point and if you have further questions, you just have to read the documentation.


15
[+1] [2009-11-26 11:14:43] VoidPointer

One thing I'd also like to mention here that helped me quite a bit in addition to the other great resources folks have provided here is "Thinking in Python" by Bruce Eckel. It is available at http://www.mindview.net/Books/Python/ThinkingInPython.html


16
[+1] [2010-07-20 06:02:07] Stattrav

How to think like a computer scientist ( http://openbookproject.net//thinkCSpy/ ) and Dive into Python as Steve Losh already mentioned. Two most amazing online references/tutorials ever!


(2) 'How to think...' is for people who never programmed before. - Tshepang
17
[+1] [2011-12-30 13:26:20] Peter Werner

I would go for

Beginning Python: From Novice to Professional [1] (Books for Professionals by Professionals)

[1] http://rads.stackoverflow.com/amzn/click/1590599829

18
[+1] [2012-01-30 22:37:18] Ignas B.

Learning Python by Mark Lutz is an awesome book.


19