Rock Solid Python with Python Typing Transcripts
Chapter: Orthogonal Typing
Lecture: Orthogonal/Structural Typing Introduction
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
Much of what you've already seen, you might have been a little bit familiar with.
0:07
Even if you didn't do a lot of work with Pydantic, you've probably heard of it.
0:10
Probably heard of FastAPI and you've probably heard of a lot of the things we talked about in the typing syntax section.
0:18
However, in this part, I feel like there's going to be many things in here that you have not seen.
0:26
This is a less commonly used aspect of Python typing. But honestly, it's pretty awesome.
0:34
We're going to talk about something called structural typing, or I've labeled this chapter
0:38
orthogonal typing in the sense that it's not in the same direct way that you would have
0:45
typing in regular Python, aka nominal typing that is like with classes and inheritance. And this thing is a one of those.
0:53
This is more about applying features or restrictions or structure to other parts of code, even if you don't change that part of code. It's pretty neat.
1:04
I'm gonna have a good time talking about it.