3 ms·
I've only really ever needed one decorator. The lovely @fuckit from fuckit. Tells your code to ignore all errors and keep on truckin. Great for prod if an erro
by spywaregorilla 4y ago
I've only really ever needed one decorator. The lovely @fuckit from fuckit. Tells your code to ignore all errors and keep on truckin.
Great for prod if an error is unnacceptable
(or more realistically, web scraping where you just don't care about one off errors)
- staticautomatic 4y agoDoes it just wrap the code in a context manager where __exit__ returns True or something?
- dnadler 4y agoI'd imagine it's just a try/except wrapper with a funny name.
- spywaregorilla 4y agoIt's not just a try/except wrapper, it's a try/except wrapper for every single statement individually in a given class or function :) It has some ast stuff built in. @fuckit def this_is_fine(garbage_in): x = 1 / 0 return "garbage_out" this_is_fine("") ### Returns "garbage out"