Chapter 9
The Intersection of Object-Oriented and Functional Programming
There are many aspects of Python that appear more like functional programming than object-oriented programming. Although object-oriented programming is the focus of this book, there are compelling use cases for functional programming techniques. With Python, the underlying implementation is object-oriented. However, using some functional design techniques can make code more expressive. In this chapter, we’ll be covering a grab bag of Python features that are not strictly object-oriented:
-
Built-in functions that take care of common tasks in one call
-
An alternative to method overloading
-
Functions as objects
This chapter will scratch the surface of a very deep topic. For a deeper dive, see Functional Python Programming, https://www.packtpub.com/en-us/product/functional-python-programming-9781788627061.
We’ll...