HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by h8hawk | Hacker News Reader
Parent
Full thread
h8hawk
·
It would be better to emulate
difer
with
with
context manager.
View on HN
luoyusang2007
·
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
·
I guess you're talking about _defer_?
https://gist.github.com/adisbladis/6e6241e1f0cc1b3ed8c183198...
Reply on news.ycombinator.com