Talk Python To Me cover image

#404: Clean Code in Python

Talk Python To Me

Is There a Way to Use Guarding Clauses?

2min Snip

00:00
Play full episode
The default deck is really nice too. We're removing tests and checks and initializes because you don't have to check if a key is in a dictionary, you can just assume it's there. So anytime I need to, if it's a big collection and I need to insert stuff on at the start, then a collection deck from the collections module is a better choice. All right, let me see. Do I have any others that I want to squeeze in here? Okay, so here's one that I wanted to sneak in before we get further beyond this is to use guarding clauses. And I don't know how you feel about guarding clauses. Yeah, you do. Tell people

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