In this video I will be showing you how you can easily create your own custom exceptions in Python easily. ▶ Become job-ready with Python: www.indently.io ▶ Follow me on Instagram: / indentlyreels
Пікірлер: 33
@softwareengineer89233 ай бұрын
This channel is pure golden. Thanks a lot for another useful content🙏
@AlbieryRodriguez3 ай бұрын
I really love your videos, I've been learning a lot of them
@ego-lay_atman-bay3 ай бұрын
Can you do a video explaining pickling?
@reezuleanu16763 ай бұрын
I only have one question, why would someone want to serialize an exception object using pickle?
@aircommander263 ай бұрын
Nice, thank you for this...
@WedgeDev13 ай бұрын
Nice video!
@LegionLeague3 ай бұрын
Pickling an Exception seems pretty random. What are use cases for it? Why would I want to pickle my custom Exception?
@tochimclaren3 ай бұрын
What I'm also asking. Genuinely, I don't know what it's used for.
@VK-qh6pr3 ай бұрын
Pickle is just serialising objects. Still confused what he wants to explain by that approach !?
@creed404yt93 ай бұрын
I guess it was just a bonus lesson like he didn't want to make a dedicated video for it, also this would make the video 8min @@VK-qh6pr
@Indently3 ай бұрын
Personally I have never had to pickle an Exception, but you never know, and it was a free way to include how __reduce__ works for classes that you would like to pickle someday :)
@balazsszalai413 ай бұрын
I actually came across a situation where it comes in handy to pickle exceptions. In multiprocessing all the communication between processes is done using pickled data and for example if you handle your exception in a process which then sends its return value to the main program (for example by Pool.map), by pickling the exception you can just send it too and handle it again in the main program properly and know where it went wrong in the other process.
@striatp3 ай бұрын
Your tutorials are awesome! But I was just wondering what IDE are you using? It looks awesome.
@Indently3 ай бұрын
I use PyCharm
@striatp3 ай бұрын
@Indently Alright thanks! 😁
@navidyaghmaei3 ай бұрын
Hey love your tutorials. They are amazing. I was wondering though why you didnt use value: any, as it would also work
@tochimclaren3 ай бұрын
Why is pickle important and when is it useful.
@victorgomez67773 ай бұрын
Great video! I do have a question: If you want to create a custom exception with only a message I usually do: Class MyException (Exception): ... And it does the trick, ¿Is there a cleaner way to do it? Because it feels kind of bungle 😅
@notLinode3 ай бұрын
If you just want an Exception with a different class name, that's what you do. I think this won't work in Python 2 though.
@TasCashGr3 ай бұрын
Life goals: "build a library called meeseeks"
@umjames3 ай бұрын
Can do!
@rvft3 ай бұрын
54 likes, zero dislikes
@Indently3 ай бұрын
Where all my haters at? D:
@codures3 ай бұрын
@@Indentlythey await asyncio.sleep(2**32)
@cihansenatak10903 ай бұрын
So, we Can expand try, except in Python with this method.
@Algorithmswithsubham3 ай бұрын
please make some ios apps
@pabloalonso90833 ай бұрын
What does even pickling means ? 😂
@skewty3 ай бұрын
like JSON but It de-serializes into proper class instances auto-magically. Great for multi-process python sharing.
@skewty3 ай бұрын
the term comes from the process of preserving food for long term storage using pickling (salt brine)