Author ncoghlan
Recipients ncoghlan
Date 2013-10-26.06:43:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382769830.57.0.0645984337848.issue19403@psf.upfronthosting.co.za>
In-reply-to
Content
I realised making contextlib.redirect_stdout reentrant was actually fairly easy (thread safety is inherently impossible due to the process global side effect). Since making it reentrant makes it more user-friendly, I'll tweak the implementation to work that way.

Need to resolve issue 19330 first, though.

As part of this change, the reusable-but-not-reentrant example in the docs needs to be updated to use contextlib.ExitStack rather than this (that's inherently not reentrant, since all the context managers in the stack would be triggered when the innermost context ends).
History
Date User Action Args
2013-10-26 06:43:50ncoghlansetrecipients: + ncoghlan
2013-10-26 06:43:50ncoghlansetmessageid: <1382769830.57.0.0645984337848.issue19403@psf.upfronthosting.co.za>
2013-10-26 06:43:50ncoghlanlinkissue19403 messages
2013-10-26 06:43:50ncoghlancreate