[Python-Dev] PEP 567 v2
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Jan 4 18:56:52 EST 2018
Guido van Rossum wrote:
> It was get_context() in an earlier version of PEP 567. We changed it to
> copy_context() believing that that would clarify that you get a clone
> that is unaffected by subsequent ContextVar.set() operations (which
> affect the *current* context rather than the copy you just got).
In that case it seems clear to me that "the context" is
conceptually a mutable mapping. The fact that it happens
to be built out of immutable components is an implementation
detail that user-level docs should not be talking about.
--
Greg
More information about the Python-Dev
mailing list