Making multiple inheritance not work

by Andy Fundinger

Language Features & Internals

This talk is a destructive examination of the workings of Python's inheritance model. We'll learn how it works by breaking it. By breaking inheritance in various ways, we will learn about the hooks that Python gives us to interact with it. These include using the metaclass to alter the class during construction, and two dunder methods which serve as useful hooks. Particular examples will include: Implementing interfaces in Python, turning inheritance off in favor of explicit reuse, and simplifying classes by disabling a selection of features you don't wish to use. While none of these are meant to be particularly useful implementations, they make good use cases to show the machinery.


About the Author

Andy Fundinger is a senior engineer at Bloomberg, where he develops Python applications in the Data License group and supports Python developers throughout the firm through the company's Python Guild. Andy has spoken several times at PyGotham, as well as other conferences such as PyCon, PyCascades, QCon, PyCaribbean, and EuroPython. In the past, Andy has worked on private equity and credit risk applications, web services, and virtual worlds. Andy holds a Masters of Engineering from Stevens Institute of Technology. In his spare time, Andy is a maker who works on Internet of Things (IoT) projects and teaches classes at MakerBar in Hoboken, NJ.


Talk Details

Date: Sunday Nov. 17

Location: Concert Hall

Begin time: 11:40

Duration: 25 minutes