Thomas Waldmann <thomas.j.waldm...@gmail.com> added the comment:
https://github.com/borgbackup/borg/pull/4247/files this is the current code i have for this (it is not as simple there as in the minimal code samples i attached here). i meanwhile think i can not use a contextmanager there. do you think this is as good as it gets for this kind of code? if you all think this is expected behaviour for the python contextmanagers and can't be done better, this issue can be closed. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35686> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com