The Art of Subclassing

E
Type:
Talk
Audience level:
Intermediate
Category:
Best Practices/Patterns
March 9th 11:30 a.m. – 12:10 p.m.

Description

All problems have simple, easy-to-understand, logical wrong answers. Subclassing in Python is no exception. Avoid the common pitfalls and learn everything you need to know about making effective use of inheritance in Python.

Abstract

Avoid the common pitfalls and learn everything you need to know about how subclass in Python.

  • Overriding and extending
  • Calling your parents
  • The ellipse / circle problem
  • What does a subclass mean?
  • Liskov Substitution Principle
  • Open Closed Principle
  • Facts of life when subclassing builtin types
  • Cooperative Multiple Inheritance
  • Common subclassing patterns
  • Use of the double underscore