On Sun, Aug 27, 2017 at 4:01 PM, Nathaniel Smith <n...@pobox.com> wrote: > I believe that the current status is: > > - assigning None isn't treated specially – it does mask any underlying > values (which I think is what we want)
Correct. > > - there is currently no way to "unmask" > > - but it's generally agreed that there should be a way to do that, at least > in some cases, to handle the save/restore issue I raised. It's just that > Yury & Elvis wanted to deal with restructuring the PEP first before doing > more work on the api details. Yes. I think it's a good time to start a discussion about this, I can list a couple ideas here. For checking if a context variable has a value in the topmost LC, we can add two new keyword arguments to the "ContextVar.lookup()" method: ContextVar.lookup(*, default=None, topmost=False) If `topmost` is set to `True`, `lookup` will only check the topmost LC. For deleting a value from the topmost LC we can add a new "ContextVar.delete()" method. Yury _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com