RSS Amplifier

Hynek Schlawack · Apr 22, 2023

Subclassing, Composition, Python, and You

0
Sign in to vote or save

Hynek Schlawack · Hynek Schlawack

Ever seen a code base where understanding a simple method meant jumping through tangled class hierarchies? We all have! And while “Favor composition over inheritance!” is almost as old as object-oriented programming, strictly avoiding all types of subclassing leads to verbose, un-Pythonic code. So, what to do?

So far, I’ve held it at PyCon US 2023 in Salt Lake City, USA, EuroPython 2023 in Prague, Czech Republic, PyCon UK 2023, Cardiff, UK, and Fwd Days Python+DS 2024, Kyiv, Ukraine + Online.

Slides on SpeakerDeck.

Subclassing, Composition, Python, and You @ EuroPython 2023

Additional material

For more information and links, please refer to my blog post Subclassing in Python Redux.

About this talk

This talk might be my best and most important one. But as you can see from the list where I gave it, it’s all conferences where I paid my way to get to. Clearly, the old “community contract” of writing great talks and getting invited around the world is another victim of COVID-19 and Russia’s despicable invasion of Ukraine. Given the amount of work I put into my talks, that led to a minor identity crisis.

But it also inspired me to try to apply my existing skills on YouTube. So, if you like my talks, please check out my channel!

This post was made possible by the donations from people and corporations who appreciate my public work.

Want more content like this? Here's my free, low-volume, non-creepy Hynek Did Something newsletter! It allows me to share my content directly with you and add extra context:

Read the original on hynek.me

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.