3 ms·
It would be better to emulate difer with with context manager.
by h8hawk 7y ago
It would be better to emulate difer with with context manager.
- adisbladis 7y agoI guess you're talking about _defer_? https://gist.github.com/adisbladis/6e6241e1f0cc1b3ed8c183198251c00c https://gist.github.com/adisbladis/6e6241e1f0cc1b3ed8c183198...
- luoyusang2007 7y agoActually 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!