The 3rd edition of Learning Python, by Mark Lutz, covers the Python programming language as of Python v2.5. With O’Reilly books, the Learning series is generally less sophisticated than the Programming series (ex/ Learning Perl is easier than Programming Perl). I would normally get the Programming version, but I think the Programming version that covered v2.5 was not yet released when I went shopping for a book on Python.

Anyway, I read this book from the perspective of a veteran programmer, having previously worked in COBOL, C, C++, Java, Perl, PHP and .NET technologies such as C# and ASP.NET. I was interested in an in-depth look at Python, a language I had tinkered with for a single work project before but really had not mastered.

In short, I was blown away. Python is a beautifully crafted language. It took the most appealing parts of Java (simplicity, OO model, exception handling, garbage collection), C++ (multiple inheritance, operator overloading), LISP (lambda syntax) and others, and put them together with expression syntax both elegant and powerful. After reading this book, I cannot wait to program in Python.

The book is divided into 7 sections: Getting Started, Types and Operations, Statements and Syntax, Functions, Modules, Classes and OOP, Exceptions and Tools. In each section, the bread and butter is taught along with plenty of practical examples. There are chapters covering advanced usage in each section of the book, and the author does a great job of pointing out areas of the language most prone to overuse by zealous programmers. Generally, Python is best used its simplest forms, as opposed to Perl, with which elegance and complexity seem to go hand in hand. ;-)

Concurrent programming and Python extensions were left out of Learning Python. Those interested in these topics were recommended Programming Python, or the standard Python manual, available here.

In a few places, the author notes where features are still supported in v2.5 but will throw deprecation warnings, and other places where a feature will be available in v2.6 or v3.0 but can be accessed in current form by importing the “future” library.

All in all, a very pleasant read. Covering an entire programming language in a single volume is always challenging, but I feel after finishing this book, that I’m ready to try it out.

I’ll keep you posted… ;-)