Nick Coghlan <ncogh...@gmail.com> added the comment:
Similar to closing, we have dedicated context managers for stdout and stderr redirection now: https://docs.python.org/3/library/contextlib.html#contextlib.redirect_stdout Redirecting stdin could be a good example though, since we've so far chosen not to provide a standard context manager for that (it's a sufficiently uncommon use case that we haven't seen the need to add it directly). ---------- _______________________________________ 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