Talk Python To Me cover image

#404: Clean Code in Python

Talk Python To Me

The Typing Dot Final, Is It Meanless to Python?

3min Snip

00:00
Play full episode
The typing dot final, when this was added in three eight reason they discovered that yes, super nice. So the example in the Python docs says there's a max size capital max capital size, instead is just saying it's colon final 9000. Now, that means nothing to Python. But it means something to type checkers, right? If you have like my pie or something, and somebody tries to change the value of it later, it's going to come at least as a linting type of error if not a full on runtime error. Another idea that I think comes in that's pretty interesting is the sentinel pattern, where you come up with a particular number and sort of

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode