“Learning Python”: A quick review

My voyages into the Python programming language have largely been courtesy of a text called “Learning Python”, written by Mark Lutz and published by O’Reilly and Associates.

It has to be said: as a text for an experienced programmer learning Python, it’s severely lacking. For a beginning programmer, it’s probably worse.

Its main problem is that it seems to have trouble deciding what it is: a reference or a tutorial. The text is written largely in a tutorial style, going over the details of the language. However, the chapters are arranged largely as a reference, with each component of the language given a chapter or two to itself. Actual programming exercises are left to the end of the section, where each “Section” consists of the set of chapters covering a particular component of the language.

Control constructs, for example, are not introduced until well after page 300 of the eText. They’re introduced after a hundred or so pages introducing you to how Python runs programs (summary: a bytecode) and another couple of hundred introducing the fundamental types.

The net result is that you read hundreds of pages of text without writing a single line of code beyond retyping the chapter examples. I have an above-average memory, but remembering a hundred pages of text in detail without using its contents is not something I would regard as a good pattern for teaching. You learn programming by writing code, and there is precious little of that in this text.

Another minor point is that it uses as its reference version of python the 3.x stream, whereas most of the Python code and libraries available today are from the 2.x stream. As Python 3.x is not entirely compatible (in either direction!) with Python 2.x, you spend most of your time focusing on a version of Python that is just not used very much. It does actually lay down the differences between versions whenever they crop up, but the reference version is 3.x.

Altogether I can’t recommend it. As soon as I find a better text I’ll do a similar review. For now your best bet is probably www.learnpython.org.

One thought on ““Learning Python”: A quick review

  1. Quick followup – “The Quick Python Book” by Naomi R. Ceder is a much better introduction to the language.

    It’s also largely focused on 3.x, but covers 2.x adequately, and more importantly is structured as learning material rather than being a bastard half breed between a tutorial and a reference.

Leave a Reply

Your email address will not be published. Required fields are marked *