r/Python • • Nov 25 '22

Intermediate Showcase defer in python!

https://github.com/dankeyy/defer.py

stupid but works lol hope you like it

302 Upvotes

62 comments sorted by

View all comments

Show parent comment

12

u/relvae Nov 25 '22

If an exception is thrown then close wouldn't be called in that case. Python already has context managers to deal with that but OP has gone rogue lol

1

u/kezmicdust Nov 25 '22

I see! Thanks.