The Real Python Podcast cover image

Discussing Type Hints, Protocols, and Ducks in Python

The Real Python Podcast

00:00

Is the Operator Overloaded in the Sets?

The operat operator is used in the sympex of paten matching. But it's not the same thing as when you invoke a method with denter, for instance. The pipe operator can also be used to instantiate new strings if possible. If you write stern x in a patern that is not an invocation of the constructor. That's actually a type assertion. You're saying that x must be a string.

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