This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients ncoghlan, petr.viktorin, serhiy.storchaka, taleinat
Date 2018-06-24.09:05:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529831160.15.0.56676864532.issue33468@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2018-06-24 09:06:00ncoghlansetrecipients: + ncoghlan, taleinat, petr.viktorin, serhiy.storchaka
2018-06-24 09:06:00ncoghlansetmessageid: <1529831160.15.0.56676864532.issue33468@psf.upfronthosting.co.za>
2018-06-24 09:06:00ncoghlanlinkissue33468 messages
2018-06-24 09:06:00ncoghlancreate