DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Coding
  3. Languages
  4. eBook Review – Guide to: Learning Iteration and Generators in Python

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

Mike Driscoll user avatar by
Mike Driscoll
·
May. 05, 12 · Interview
Like (0)
Save
Tweet
Share
6.63K Views

Join the DZone community and get the full member experience.

Join For Free

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

Python (language)

Published at DZone with permission of Mike Driscoll, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Submit a Post to DZone
  • The 5 Books You Absolutely Must Read as an Engineering Manager
  • How To Handle Secrets in Docker
  • Fargate vs. Lambda: The Battle of the Future

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: