Python has many core features of functional programming, so it can learn from the design patterns and programming techniques of other functional languages to write concise and elegant code. This book first introduces the general concepts and characteristics of functional programming, and then explains iterators, generator expressions, built-in functions, commonly used higher-order functions, recursion and reduction, the use of utility modules and decorators, as well as workarounds to avoid Python's strict evaluation order, Web service design methods and some optimization techniques.
Reader comments
As mentioned in the book, although Python is not a purely functional language, many of its core features can help us write concise and elegant code. I particularly like generator expressions, which avoid creating large data structures and speed up execution. Moreover, the book also introduces many practical modules and decorators, which are very helpful for my programming learning.
As mentioned in the book, although Python is not a purely functional language, many of its core features can help us write concise and elegant code. I particularly like generator expressions, which avoid creating large data structures and speed up execution. Moreover, the book also introduces many practical modules and decorators, which are very helpful for my programming learning.