Do you want to take your Python to the next level? Python is easy to learn. You can learn the basics in a day and be productive with it. But there are more advanced constructs that you will eventually run across if you spend enough time with it. Don't be confused by these. Learn them, embrace them, and improve your code and others.
I first met Matt Harrison years ago when he gave a great tutorial on decorators and functions at the Southern California Linux Exposition. In less than an hour he managed to get a packed room understanding and writing their own decorators. I took copious notes, and wished there was a book he wrote that I could reference.
Fortunately, this is that book. ;-)
Matt starts with the functional built-ins of Python such as lambda, filter, map, reduce, adds in recursion, then tops it off with list, set, and dict comprehensions. It's great stuff and he explains it well.
The next part of the book delves into iteration and generators. If you know anything about Python's functional capabilities, you know this builds pretty much right off the first part. For me, I found this made the book feel like it built upon itself in a clever, conceptual sort of way.
Finally, the last part is a really nice piece on decorators, which means functions and more functions!
All in all I really liked this book and learned from it. If you have at least a basic understanding of Python and are interested in the language, you owe it to yourself to get this book.
Includes excellent examples with fairly comprehensive explanations for a wide variety of language features. Special care is taken to highlight the differences between Python 2 and Python 3, especially that some of the features which are available in Python2 are sometimes vastly different in behaviour (lazy methods rather than producing sequence upfront), implementation (map as built-in function VS. Built-in class), or location (moved from standard libraries). The only section that could benefit from further elucidation is that of Chapter 14 - Alternate Decorator Implementations.