TechBookReport logo



Keywords: Python 2.3, Python 2.4

Title: Python Cookbook, 2nd edition

Editors: Alex Martelli, Anna Ravenscroft and David Ascher

Publisher: O'Reilly

ISBN: 0596007973

Media: Book

Level: Beginner/Intermediate

Verdict: An essential resource

 

We're big fans of cookbooks here at TechBookReport, whether its Java, XSLT or Linux, they're a great way of pulling together lots of useful snippets of code and technique in one place. For the beginner they provide instant advice, usable code and a way into new areas. They're also a great way to find out about coding styles, idioms, common workarounds and how to get the most out of your language (or operating system, development environment or application…).

Given all of that then it should be no surprise that we love this second edition of the Python Cookbook. There's no doubt about it, this is an indispensable resource to have around. What's more, this latest edition has been enhanced and updated for Python 2.4, and now features more than 330 recipes across 20 chapters. Note that the recipes only cover Python 2.3 and 2.4, for older versions readers should look for the first edition of the book.

As with the rest of O'Reilly's cookbooks, this one has a standard format for each recipe: state the problem, present a solution, discuss the solution and provide cross-references and pointers to further material. It's a good format, and allows each recipe to pretty much stand alone, even if there are pointers to other recipes in the 'see also' section. This makes the recipes a useful place to dip into for ideas and examples when hacking your own code. As with a real cookbook this is one that has a practical focus and belongs by your side when cooking not on some shelf gathering dust.

Unlike most of the other books in the cookbook series, this one is not the product of one or two authors but very much a community effort, thanks in large part to the involvement of ActiveState. While the three editors deserve credit for the good job they've done putting it all together, it's down to the Python community for creating these recipes and providing the feedback to hone and improve them.

Furthermore a host of luminaries (including Mark Hammond, Mark Lutz, Paul Prescod, Gustavo Niemeyer, Andy McKay and more), introduce each of the chapters. They provide a run-down of the topic area - string handling, files, XML, web programming, objects, databases etc - providing a quick introduction to the Pythonic way of doing things and setting the context for the recipes that follow.

For the beginning Python programmer this is an excellent book to help step up a level. For the intermediate programmer the scope of topic areas provides a fast introduction to new areas. Truth be told, this is a book we can recommend to Python programmers at every level. An essential buy.


Hit the 'back' key in your browser to return to subject index page

Return to home page

Contents © TechBookReport 2005. Published June 2 2005