Some pep8 fixes

These are just some pep8 style fixes.

(For background, since I suspect these pull requests are coming rather out of nowhere: we are evaluating this library for use in our system, and making a few changes in the course of that.  I thought it would be nice to share them back upstream.)