This week, I discovered a new book on Python titled Treading on Python Vol. 1 by Matt Harrison. The book is only in draft form, so it’s still pretty rough, but the author was kind enough to send me a free copy in epub and mobi formats. I read part of it using EPUBReader, an add-on to Firefox so I could read it in my browser. Then I switched to the PC Kindle software to finish the book.

The book is your typical introductory text to Python. I felt like it was a tad shorter than some of the intro books I’ve read though, but that may be because it was an eBook. He covers what you would expect, but here’s a short list of topics:

  • Installation of Python
  • The Interpreter
  • Numbers and Strings
  • dir and help (introspection, although he never uses that word)
  • comments
  • Sequences (lists, tuples and dicts)
  • Functions, Classes, and Methods
  • File I/O
  • Exceptions – very brief, doesn’t show how to make your own

He uses a few odd terms that I’ve never heard, like calling the double-underscore methods of Python “dunder methods” (like __init__ or __seq__). The only name I’ve ever heard for those are “magic methods”. He also says the following: It is common to hear in Python parlance of “truthy” or “falsey” (Kindle location 700) regarding bools and bool-like objects. I’ve read a lot of books on Python and never come across that before either. It’s no big deal, they just kind of jumped out at me and left me scratching my head.

Anyway, I can’t be too hard on it because it’s still only a draft. I did notice that some of the first sections in the book seem to get repeated later on. I’m not sure if that was intentional or not. Maybe it was a way of emphasizing the material. Regardless, the information in the book is pretty good for someone who is just coming to the language. I should mention that it’s more of an overview book though. Every topic has only 1-4 pages of information on it on average, so this book will give you enough information to get going, but you’ll still need to read the docs if you hit a wall. For example, he mentions comprehensions, but never says what they are. You don’t need those when you program, but they sure can be nice. On the other hand, he does talk about the “with” statement quite a bit.

Overall, I would say this is a pretty good introductory text on Python. The reader will get a nice overview of the language without the confusion of 3rd party packages or even very much of the included modules. They get a little introduction to Python introspection tools, which is pretty nice. When the book is finished, this is one you may want to keep in mind for your budding Pythonista. You can actually purchase the book from his website now for $4.99 and I think you get the final version when it’s done, kind of like Manning’s Early Access Program (MEAP).

Print Friendly