Why You Should Think Twice Before Using Returns in Python

๐Ÿ’ก Learn how to design great software in 7 steps: https://arjan.codes/designguide. Struggling with Python's unpredictable errors and None checks? In this vi...

Why You Should Think Twice Before Using Returns in Python
ArjanCodes
94.1K views โ€ข Dec 6, 2024
Why You Should Think Twice Before Using Returns in Python

About this video

๐Ÿ’ก Learn how to design great software in 7 steps: https://arjan.codes/designguide.

Struggling with Python's unpredictable errors and None checks? In this video, I share a unique approach to making your code cleaner and more reliable using the returns packageโ€”no complicated try-except nests required.

๐Ÿ”ฅ GitHub Repository: https://git.arjan.codes/2024/returns.

๐ŸŽ“ ArjanCodes Courses: https://www.arjancodes.com/courses.

๐Ÿ’ฌ Join my Discord server: https://discord.arjan.codes.

โŒจ๏ธ Keyboard Iโ€™m using: https://amzn.to/49YM97v.

๐Ÿ”– Chapters:
0:00 Intro
0:32 Why do we need a package like this?
3:02 Introduction to the Returns Package
3:18 What Are Containers?
3:55 The Maybe Container: Handling Missing Data Elegantly
6:40 Using Structural Pattern Matching with Maybe
8:01 Railway-Oriented Programming in Python
11:01 Mapping Exceptions to Railway-Oriented Programming
12:36 Using the @safe Decorator for Automatic Error Handling
14:12 The IO Container: Managing Side Effects
17:53 Should You Use the returns Package?
20:57 Final thoughts

#arjancodes #softwaredesign #python

Tags and Topics

Browse our collection to discover more content in these categories.

Video Information

Views

94.1K

Likes

2.4K

Duration

21:27

Published

Dec 6, 2024

User Reviews

4.7
(18)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.

No specific trending topics match this video yet.

Explore All Trends