[x^2 for x in lst]

Effective Python

Author: Brett Slatkin

Review created: 2015-07-18

Effective Python is a book written in the same format as the great books in the Effective C++ series by Scott Myers. It is not surprising that Addison-Wesley builds on that successful format as the C++ books must have sold very well (they ought to, as good as they are).

The contents of Effective Python consists of 59 items distributed over 216 pages. Each item is between two and six pages long and cover one particular aspect of Python. The topics of the items ranges from how to partition a Python program in a good way to metaclasses and concurrency over to useful parts of the Python standard library. The book is not an introduction to Python; the author assumes that the reader already knows the language. Having said that, you don't have to be a Python expert to find the book useful. A basic knowledge of the language is sufficient. As a matter of fact, I would like to recommend the book as the second Python book after having finished an introductory book such as Beginning Python by Magnus Lie Hetland.

Effective Python is written in a clear, easy to understand way. It contains a lot of example programs exemplifying the different topics. It contains a good mix of text discussing the topic in question and example programs visualizing what is discussed in Python code.

In the end of each item, there is a list of bullets summarizing the contents of the item. This is a really good thing as it enhances the memorization of what you just have read and also makes it easier, at later time, to skim through the book to search for something of particular interest or just to repeat the main points of the book.

The main focus of the book is writing programs in Python3 (version 3.4 is used). When a language construct is not present in Python2, this is pointed out and a pointer to an alternative solution is given. The description of such alternative solutions are not very comprehensive however and the interested reader must perform additional research himself/herself. This focus on Python3 is a good thing as think, as it encourages programmers not having started using Python3 to take the leap from Python2 over to Python3.

I like the format of the book very much. The division into short items makes it possible to read one self-contained part of the book in a short time. This suits me very well as I most often read on my way to work or just before I go to sleep, which means that I have approximately 15 minutes of reading per session. I.e. just enough time to finish one or two short items.

I also like the contents of the book. There is a lot of really useful stuff in it. Much of it I haven't heard of or thought of before. Regarding the things I have heard of before, it is still very useful to having them gathered in a single place.

Highly recommended!

Rating: 4 out of 5.