~/talk

Subclassing vs Composition: A Survey of Trade-offs in Python

TalkinUkrainianat Python + DS fwdays'24 conference · on Saturday, 2024-04-20· [python]
links:none on file
slides:none on file

Examines trade-offs between subclassing and composition in Python, naming different forms of subclassing and patterns used in the language. Uses Python examples to show when subclasses make code more Pythonic versus when composition improves clarity, aiming to give practical guidance rather than dogma.

AI-written summary · about

  1. 0:00Introduction to class design
  2. 1:34Subclassing vs composition
  3. 5:11Complexity of hierarchies
  4. 8:46Template subclassing issues
  5. 12:54Implementing clean interfaces
  6. 18:32Architecture and testability
  7. 22:19Namespaces and encapsulation
  8. 25:28Trade-offs in design
  9. 31:37When to use subclassing
  10. 39:00Conclusion and takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.