This is the website for an older EuroPython. Looking for the latest EuroPython? Click here!
Skip to main content

Learning the ropes: understanding Python generics

Level:
advanced
Room:
north hall
Start:
Duration:
30 minutes

Abstract

What if you don't want a Cat to be an Animal? What is the Liskov Substitution Principle? And what on earth is contravariance?

Discover the answers to these questions and more, as we explore the foundations of generic types in Python. And by the end, you might even understand the weirder errors that Mypy sometimes throws your way.

TalkSoftware Engineering & Architecture

Description

Do you run a static type checker, such as Mypy, on your Python code? And have you ever been confused by the error messages?

In Learning the Ropes, we'll explore how the Python's support for generics can unlock new patterns in your code. Along the way, we'll learn about some foundations of type theory which will give you a firmer understanding of what type safety really means. Suddenly those Mypy errors will make sense. Be prepared to think hard and learn fancy new terms with which you can dazzle your friends and relations!


The speaker

David Seddon

David Seddon

David Seddon works in London at Kraken Tech, the technology tentacle of Octopus Energy. There, he works on a very large Django monolith consisting of tens of thousands of Python modules.

He loves thinking about and teaching software design, in particular domain modelling and application architecture.

He is the creator of Import Linter, an open-source tool to check your Python project is following a set of architectural rules you define.

He blogs at https://seddonym.me.


← Back to schedule