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-September/149300.html below:

[Python-Dev] PEP 550 v4

[Python-Dev] PEP 550 v4Stefan Krah stefan at bytereef.org
Thu Sep 7 10:42:21 EDT 2017
On Thu, Sep 07, 2017 at 09:41:10AM -0400, Elvis Pranskevichus wrote:
> threading.local(), the isolation mechanism, is *implicit*.  
> decimal.localcontext() is an  *explicit* resource manager that relies on 
> threading.local() magic.  PEP 550 simply provides a threading.local() 
> alternative that works in tasks and generators.  That's it!

If there only were a name that would make it explicit, like TaskLocalStorage. ;)


Seriously, the problem with 'context' is that it is:

  a) A predefined set of state values like in the Decimal (I think also
     the OpenSSL) context.

     But such a context is put inside another context (the ExecutionContext).

  b) A theoretical concept from typed Lambda calculus (in the context
     'gamma' the variable 'v' has type 't').

     But this concept would be associated with lexical scope and would
     extend to functions (not only tasks and generators).

  c) ``man 3 setcontext``. A replacement for setjmp/longjmp.  Somewhat
     related in that it could be used to implement coroutines.

  d) The .NET flowery language.  I do did not fully understand what the
     .NET ExecutionContext and its 2881 implicit flow rules are.

  ...



Stefan Krah



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