The Python Standard Library by Example, written by Doug Hellman, Review by Ryan Balfanz
If you have ever worked with Python, you have probably come across Python Module of the Week (PyMOTW) or virtualenvwrapper. Both are the work of Doug Hellmann.
Library By Example. If Python gives you the batteries, Hellmann gives
you not only an instruction manual but the “on” switch to get you
going right away.
The Python documentation is really great, but might leave some with a
“some assembly required” feeling. The book's examples aim to be more
complete, while still covering a serious breadth of the Standard
Library. Do not expect to use all of the examples in your project
without some modification, customization and expansion. After all,
they are miniature projects in their own right.
By the Numbers
--------------
It weighs in at a whopping 1300-something pages across 19 chapters.
This translates roughly to a 2-inch print copy, or a 7.3 MB PDF. The
accompanying source is 5.5 MB after unzipping and contains 113 example
modules. The examples were tested with Python 2.7. Some of the
examples would port to Python 3 easily, others not so much. Even
before reading it, I was pretty impressed and somewhat reluctant. Some
of those numbers might not be very meaningful as far as the book's
usefulness, but it should give you a sense of how much material is
covered. In my opinion, you get a lot for the price.
What I Thought
--------------
I use Python as my primary language and I admit that I had never heard
of some of the modules covered (e.g. anydbm, asyncchat, pyclbr, just
to name a few). Not only that, the modules which I had previously used
were probably in the minority and smaller still are the modules which
I use regularly. This is in part due to changes made in Python 2.7
that I have not absorbed, but also because there are plenty of places
for cool features to hide out if you are not looking for them. I can
say that after being exposed to the material, I have a better
understanding of some of the most common modules and have added a few
others to my arsenal.
I would recommend this book to any serious Python programmer who wants
to get the most of what Python has to offer. If you are just starting
with Python, but comfortable with another language, you might pick up
quite a bit from just a quick skim of everything. You can then drill
down into the parts which seem most applicable or interesting.
However, if you are new to programming, this is probably not the book
for you (as mentioned in the book's Introduction, and several other
reviews I found).
I received an electronic review copy from the publisher in exchange
for my review. The past two or three days my home internet has been
down. This book was great to have around in a time of crisis. But due
to the nature of the material I think I would personally make more use
of it as a hard copy. I admit to not reading it cover to cover, but I
cannot imagine anyone wanting to do so. That said, it is definitely a
great addition to my library.
