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-August/148937.html below:

[Python-Dev] PEP 550 v3 naming

[Python-Dev] PEP 550 v3 naming [Python-Dev] PEP 550 v3 namingNick Coghlan ncoghlan at gmail.com
Fri Aug 25 00:55:43 EDT 2017
On 25 August 2017 at 01:00, Guido van Rossum <guido at python.org> wrote:
> It shouldn't be called a namespace unless the dominant access is via
> attributes.

That makes sense.

Since the main purpose of that part of the Python API is to offer an
opaque handle to where the context locals store their values,
something semantically neutral like "State" may work:

- ContextLocal: read/write API
- ContextLocalState: where ContextLocal instances actually store things
- ExecutionContext: nested stack of context local states

The attribute on generators and coroutines could then be called
"__context_locals__", and that would either be None (indicating that
any context local references will just use the already active context
local storage), or else it would be set to a ContextLocalState
instance (indicate that starting & stopping the operation will push &
pop the given context local state).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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