Product: Python Cookbook, 3rd Edition by O’Reilly Digital Media
Submitted at: O’Reilly
by JimSchubert from Seattle WA on 7/27/2013
Helpful examples, Well-written, Concise, Easy to understand, Accurate
Intermediate, Student, Expert, Novice
I read Python Cookbook as part of the O’Reilly Bloggers program. I would highly recommend Python Cookbook to developers with any level of expertise, provided they understand the basic syntax and usage of Python 3.
I don’t use Python regularly. I’ve stayed away from Python for a while because of the parallel development of the 2.x and 3.x versions of Python. One of the things I loved about this book is that the authors clearly state that the intention of the book is to cover Python 3 only. In fact, many of the recipes won’t work in Python 2.x. The book’s contents have made me rethink avoiding Python.
I consider myself somewhat familiar with Python basics, which is required if you want to gain the most from this book. While the book does start of with some simple recipes (like list comprehensions, string manipulations, math operations), it eventually delves more into advanced topics like metaprogramming, socket programming, and the intricacies of working with threads.
It may not cover extremely advanced topics in Python, but the book comes close. The last chapter discusses interacting with C libraries which you may already have experience with if you’ve read Gray Hat Python (also available from O’Reilly). I consider language interop a pretty advanced topic.
In all, I was very pleased with the content and delivery of this book. I generally bookmark one or two pages in a book, but with this book I ended with 12 bookmarked pages. It definitely left me excited about developing applications with Python 3.
One caveat to readers: some of these recipes are for demonstration purposes only and should not be used in production code. For example, recipe 10.11 shows how you’d load modules from a remote machine using import hooks. Just because you *can* do this, doesn’t mean you should.