[Python-ideas] PEP 550 v2
Stefan Krah
stefan at bytereef.org
Wed Aug 16 10:25:53 EDT 2017
On Wed, Aug 16, 2017 at 12:18:23AM -0700, Nathaniel Smith wrote:
> > Here's the PEP 550 version 2.
>
> Awesome!
>
> Some of the changes from v1 to v2 might be a bit confusing -- in
> particular the thing where ExecutionContext is now a stack of
> LocalContext objects instead of just being a mapping. So here's the
> big picture as I understand it:
I'm still trying to digest this with very little time for it. It *is*
slightly confusing.
Perhaps it would be possible to name the data structures by their functionality.
E.g. if ExecutionContext is a stack, use ExecutionStack?
Or if the dynamic scope angle should be highlighted, perhaps ExecutionScope
or even DynamicScope.
This sounds like bikeshedding, but I find it difficult to have ExecutionContext,
ContextItem, LocalContext in addition to the actual decimal.localcontext()
and PyDecContext.
For example, should PyDecContext inherit from ContextItem? I don't fully
understand. :-/
Stefan Krah
More information about the Python-ideas
mailing list