On Thu, Dec 28, 2017 at 1:51 AM, Victor Stinner <victor.stin...@gmail.com> wrote: > var = ContextVar('var', default=42) > > and: > > var = ContextVar('var') > var.set (42) > > behaves the same, no?
No, they're different. The second sets the value in the current context. The first sets the value in all contexts that currently exist, and all empty contexts created in the future. -n -- Nathaniel J. Smith -- https://vorpus.org _______________________________________________ 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