Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
h8hawk
· 6y ago · 0 comments
It would be better to emulate
difer
with
with
context manager.
Comments
[–]
luoyusang2007
6y ago
Actually we failed to do that. the "with" statement relies on "__exit__" method. It is useful but too "Python" to emulate "defer" for us.
Thanks for your opinion!
[–]
adisbladis
6y ago
I guess you're talking about _defer_?
https://gist.github.com/adisbladis/6e6241e1f0cc1b3ed8c183198...