Functional Python Programming - Create Succinct and Expressive Implementations with Python - Steven F. Lott

GoodReads Summary: With Functional Python Programming by your side you’ll understand the core concepts of function Python, its impact on the programming workflow, and how to implement it in Python, giving you the ability to take your applications to an even higher level.


Another book the proves my theory that the quality of a book is inversely proportional to the amount of "as follows".

But functional programming in Python is generators.

That's it: Generators. Oh, generators and tuples.

There is a lot in this book, but mostly seems... wrong. For example, talking about "tail call optimization", when Python does not have them. And then talking how to optimize those -- which, again, it is plain "replace with a generator".

Also, the case for tuples is that namedtuples is mentioned, but rarely used. This makes code hard to read, except the author decided to create lambdas to extract them, so you end up with a bunch of xy_g = lambda p: p[0][1][0]. What the fuck is 0, 1 and 0 again in this? Why not use name tuples and, instead of this atrocity, go with p.position.x?

Other examples of wrong things:

Besides all that, there is a bunch of explanations that are very much akin to

a = a + 1

Adds 1 to a

Also, there are chapters for multiprocessing, which has absolutely nothing functional about it and WSGI, which, again, has nothing functional about it.

The whole book feels rushed and badly reviewed -- if reviewed before publishing at all.