Monadic Error Handling in Python ⚠ Write Better Python Code Part 7B

preview_player
Показать описание


Relevant books and links:

My gear:

All parts in this series:

🔖 Chapters:
0:00 Intro
1:32 Addressing a few issues from the previous video
3:34 What is monadic error handling?
6:26 Code example
11:44 Final thoughts
12:44 Outro

👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!

#arjancodes #softwaredesign #exceptions

DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
Рекомендации по теме
Комментарии
Автор

Let me know if you'd like me to do a more in-depth video about monads and monadic error handling - I only touched the surface here ;).

ArjanCodes
Автор

I am telling you, everyone will love it when Python slowly evolves into Haskell.

sagnikbhattacharya
Автор

I've been studying Python (and programming in general) for like 8 months now, and after some months where I didn't feel like I learned a lot stumbling upon this channel has feel like a blessing. I've binged a lot of your videos and I feel like I've learnt so much in such a short time, I can't imagine how much more I can learn with 1 or 2 more years. It's insane for me to think the amount of knowledge seniors like you must have. I hope I can be like you in a few years. Thanks for the content!

cristobaljvp
Автор

Starts addressing mistakes in previous video. Proceeds to talk about monads.
You’re a brave man!

torurz
Автор

Love from my heart, Brother I have learned so many advanced and simple but precise concept from you videos which I had never learned in my 4.5+ year of python development. Please keep it up.

CoderShark
Автор

Very good content! I've been programming in Python for several years and I started learning Haskell early this year. I ended up adapting Haskell's "Maybe" logic into my Python programs to handle errors as results. I'm glad to see that I'm not alone and that this now part of a library. Will for sure take a look into it. Thanks!

domingochavez
Автор

Thoroughly enjoying these. The level is perfect for me - starts out simple with familiar concepts, then moves into the meat of the topic - explaining not just what, but the all important _why_ with clear examples (including what's wrong with the alternatives). Then as a bonus often introducing more advanced areas. Top marks :-) Love the humour as well as the human and compassionate side. Thank you Arjan!

AdrianBridgett
Автор

This sounds very similar to Go's `data, ok = called_function`. A very interesting way to do error handling in a more obvious way than exceptions.

Автор

I don't really get the advantage of using monadic error handling but maybe that's because I am not sufficiently advanced yet.
I know that it exists and maybe the usefulness of this way of handling error will become clearer in the future

EW-mbih
Автор

Great video! It would be great to see it updated to use structural pattern matching to see how it can be used to achieve it.

joaopedrorocha
Автор

i can say this very good channel, not like others tutorial/something.. its teach me writing code with better structure.. not many channel has good programing content like this.. thanks arjan

redred
Автор

A good video would be about Structural Pattern Matching in Python.

crack
Автор

Recently stumbled across your videos and i'm really enjoying your content! thank you!

jonathanheadley
Автор

Great content as always! Covering SQLAlchemy would be a great topic.

MrCucolea
Автор

Yes please more videos about this way error handling. Maybe some intro to functional programming too. What are pros and cons of FP - testing ? parallel computing ?

MrTrebor
Автор

Haha, this is crazy. This video is just like a look back to my time at university. Back then there was a module called "functional programming" and it was my second semester I believe. We programmed in Haskell and talked about Monads and I invested so much time to understand that concept and in the end I was not even close. It was way too much for me at this time. Cool memories :D

fuuman
Автор

very interesting, I'm comparing it to things like CompleteableFuture in Java or reactive approaches. Nice to see this kind of thing in Python.

Baroquepassion
Автор

this is by far the best example of using dry-python I have seen so far. Thank you. Most of the examples I have seen on-line seem forced and imho make the code less readable and maintainable. Keep the videos coming :-)

PawelOlas
Автор

The past couple weeks I've updated lots of my apps to using the Django ORM, and yes, life is good now.

ke_
Автор

I've heard Haskell people go on about Monads for years.... so simple when you just describe them without all the Haskell "look at me... I'm very clever" and we just say "oh yeah... just like error handling in Rust or promise resolution in JavaScript".

edgeeffect
join shbcf.ru