The Real Python Podcast cover image

Discussing Type Hints, Protocols, and Ducks in Python

The Real Python Podcast

00:00

The Way That Duck Typing Works Is Not Implicit

The way that duck typing works is, is more implicit. And the advantage of allowing this implicit thing is that it gives you more flexibility. For instance, when your testing is much, much easier to mock something,. That's actually a good practice in terms of the definition of protocles. Protoces usually should declare one, or at most two methods, rarely more. and they are not like enter faces designed by, i don't know, architects in that's interesting.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app