Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
The entirely abstract example LGTM. As for concrete real word examples, the possible one is changing the current working directory: cwd = os.getcwd() try: os.chdir(target_dir) yield finally: os.chdir(cwd) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33468> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com