eBook Review – Guide to: Learning Iteration and Generators in Python

Last month around the time of PyCon USA 2012, Matt Harrison sent me a copy of his newest book, Guide to: Learning Iteration and Generators in Python. I’ve been wanting to learn more about generators anyway, so I thought this was pretty fortuitous. Sadly, it took me a month to get around to reading it. The eBook weighs in at 460 kb for the mobi (i.e. Kindle) version or 240 for the epub. We’ll take a quick look at the good and the bad after the jump.

The Good

This is a very technical book. I think if it were printed, it would run around 50 pages though. So it’s a quick read. Plus it retails for only $3.99 on Amazon. I would say that this book is for intermediate to advanced Python programmers in that the author uses a lot of highly technical terminology and digs under the covers of Python itself, especially in the first few chapters. He also doesn’t spend a lot of time explaining trivial stuff, so I think this would serve as a good template for the vaunted “extreme” talk track at PyCon these days. Most importantly to me is that the book showed me where I could actually implement generators in code I was creating that very day. I just thought that was cool! You also learn the difference between iterators and iterables, which was a little mind boggling.

The Bad

The author didn’t say he was sending me a rough draft, but I think that’s what I received. What I mean by that is that there are a lot of little sentence issues where you’ll see things like a “the” instead of a “than” or a sentence that’s missing a “the”, “an” or “a”, which can make the sentence awkward to read. I found the first couple examples a little confusing as the author uses a while loop to describe a for loop. The main confusing bit was that he was referring to a while loop as it were the previous for loop example. One of the funnier mistakes was this quote:

Sites such as Stack Overfull are choke full of answers claiming that xrange is a generator. (Kindle Location 403)

The Verdict

I wasn’t able to find an errata page for the book so I can’t say if these little nitpicky things have been fixed. Because the book is pretty technical, this isn’t really the best way for a beginner to learn generators either. On the other hand, sometimes it IS good to learn the hard way first. If you’re struggling with understanding generators or wonder why they even exist, then I think this book will help you out. Otherwise you can always check out the documentation.

Guide to: Learning Iteration and Generators in Python

By Matt Harrison

Buy from Amazon

Author’s website

6 thoughts on “eBook Review – Guide to: Learning Iteration and Generators in Python”

  1.  In all fairness, the eBook does have a lot of example code in Python. Admittedly, I didn’t test the code itself, but it IS there.

  2. Um! I was refering to the typo “psuedocode” (instead of “pseudocode”) in the very first lines of the book, in agreement to your comments of the many grammatical problems. 

  3. Oh! Sorry. I missed that one. There does seem to be a lot of that in this book which is a little sad. That’s why I wondered if I’d been given a draft copy.

  4. Yours wasn’t a draft copy. On my tablet in portrait mode I see at least three typing errors within the first page. I have put up my own review here (my first review actually, I hope you don’t mind me linking it): http://kemp-reviews.blogspot.co.uk/2012/04/learning-iteration-and-generators-in.html

  5. Matt –
    No problem. Thanks for the opportunity. I bought your decorators book today and so far it’s been pretty good. I’ll probably be reviewing it soon.

  6. FYI. Amazon now has the updated book. Anyone who has the previous version, please update.

Comments are closed.