A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-December/151472.html below:

[Python-Dev] PEP 567 v2

[Python-Dev] PEP 567 v2 [Python-Dev] PEP 567 v2Nathaniel Smith njs at pobox.com
Thu Dec 28 05:20:05 EST 2017
On Thu, Dec 28, 2017 at 1:51 AM, Victor Stinner
<victor.stinner at 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4