Python is not a functional programming language, but it is a multi-paradigm language that makes functional programming easy to perform, and easy to mix with other programming styles. In this paper, David Mertz, a director of Python Software Foundation, examines the functional aspects of the language and points out which options work well and which ones you should generally decline.
Mertz describes ways to avoid Python’s imperative-style flow control, the nuances of callable functions, how to work lazily with iterators, and the use of higher-order functions. He also lists several third-party Python libraries useful for functional programming.
Topics include:
Using encapsulation and other means to describe "what" a data collection consists of, rather than "how" to construct a data collection Creating callables with named functions, lambdas, closures, methods of classes, and multiple dispatch Using Python’s iterator protocol to accomplish the same effect as a lazy data structure Creating higher-order functions that take functions as arguments and/or produce a function as a result David Mertz is a director of the Python Software Foundation, and chair of its Trademarks and Outreach & Education Committees. He wrote the columns Charming Python and XML Matters for IBM developerWorks and the Addison-Wesley book Text Processing in Python. David has spoken at multiple OSCON and PyCon events.
It's not very much an introduction to functional programming in Python but more an guide on how you can utilize these concepts in Python. The explanation is very good though and even for someone with very limited FP experience it was reasonable easy to follow along (although I didn't get everything).
You will learn the basic foundation of Functional Programming. This book has only 4 chapters. For me this most interesting part is the Flow Control chapter. In that chapter I learn how to take the advantage of recursive technique to solve a problem in a good way, by "good way" I mean "How to eat an elephant" and recursive technique make you think how to split a big problem into smaller problems.
it is condensed. but too short. it shows how functional programming can be used. But does not teach a lot how to write functional programs. if you are new to functional programming (in python) its a good start. but does need more than one read to get it at some topics.
its better to read a little on functional programming in general before starting this.
A booklet that introduces functional programming style with a non-FP language. The contents are only as long as three or four blog articles but basically cover the most commonly used FP-style implementations in Python.
Was a very good book, but too short. It is a very good intro to the mindset of functional programming for someone who knows python but is new to the paradigm.
This book gives a concise, although not comprehensive, overview of functional programming in Python. The length of the book suggests an introduction but a beginner in either Python or functional programming would have a hard time understanding some of the contents and examples immediately. I did take away a few pieces of knowledge from the book such as the use of the functools library.
I would rather not recommend this book for people who would like to view on the Python Functional Programming side without previous Functional Python experience.
The Main shortcoming of this book is lack of completely independent examples. Often they either depend on the previous code or cannot be run not being self-contained from the begging (e.g. on page 27, ```lazy = open('06-laziness.md')```) . It seems for me that book is raw and wasn't rigorously reviewed before publishing.