Functional Python
Functional Programming
Functional programming has a lot of different definitions. In a pure sense, it means abstractions have certain mathematical behaviors and guarantees. In a pragmatic, python-centric perspective, however, functional programming can be thought of as a collections of ideas and features. Many of these features are incredibly powerful and expressive, and found in many open-source libraries. Functional approaches also tend to be more scalable, and less bug-prone, but do require discipline and forethought.
Understanding functional concepts, including their pros and cons, will help you know in which situations your software might benefit from a functional paradigm or when another approach is a more natural fit. In this module we cover key concepts of functional programming and functional python features. We will also cover (time permitting) two other important python concepts which aren’t particularly functional; generators and context managers.
Outline
This module covers:
- Functional concept overview
- Scope, closures, higher-order functions (e.g. decorators)
- Anonymous functions
- Map, reduce
- Recursion
- *Generators, *context managers