[Python-Dev] Scope, not context? (was Re: PEP 550 v3 naming)

Yury Selivanov yselivanov.ml at gmail.com
Fri Aug 25 09:36:58 EDT 2017


On Fri, Aug 25, 2017 at 9:23 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
[..]
> And while PEP 550 doesn't handle the stream redirection case natively
> (since it doesn't allow for suspend/resume callbacks the way PEP 525
> does), it at least allows for the development of a context-aware
> output stream wrapper API where:

PEP 525 can't handle streams redirection -- it can do it only for
single-threaded programs.

sys.stdout/stderr/stdin are global variables, that's how the API is
specified. API users assume that the change is process-wide.

Yury


More information about the Python-Dev mailing list