Re: [Python-Dev] PEP 550 leak-in vs leak-out, why not just a ChainMap

2017-08-25 Thread Jim J. Jewett
On Aug 24, 2017 11:02 AM, "Yury Selivanov" wrote: On Thu, Aug 24, 2017 at 10:05 AM, Jim J. Jewett wrote: > On Thu, Aug 24, 2017 at 1:12 AM, Yury Selivanov > On Thu, Aug 24, 2017 > at 12:32 AM, Jim J. Jewett wrote: If you

Re: [Python-Dev] PEP 550 leak-in vs leak-out, why not just a ChainMap

2017-08-24 Thread Yury Selivanov
On Thu, Aug 24, 2017 at 10:05 AM, Jim J. Jewett wrote: > On Thu, Aug 24, 2017 at 1:12 AM, Yury Selivanov > On Thu, Aug 24, 2017 > at 12:32 AM, Jim J. Jewett wrote: > >> The key requirement for using immutable datastructures is to make >>

Re: [Python-Dev] PEP 550 leak-in vs leak-out, why not just a ChainMap

2017-08-24 Thread Jim J. Jewett
On Thu, Aug 24, 2017 at 1:12 AM, Yury Selivanov > On Thu, Aug 24, 2017 at 12:32 AM, Jim J. Jewett wrote: > The key requirement for using immutable datastructures is to make > "get_execution_context" operation fast. Do you really need the whole execution context, or do you

Re: [Python-Dev] PEP 550 leak-in vs leak-out, why not just a ChainMap

2017-08-24 Thread Nathaniel Smith
On Wed, Aug 23, 2017 at 9:32 PM, Jim J. Jewett wrote: >> While the context is defined conceptually as a nested chain of >> key:value mappings, we avoid using the mapping syntax because of the >> way the values can shift dynamically out from under you based on who >> called

Re: [Python-Dev] PEP 550 leak-in vs leak-out, why not just a ChainMap

2017-08-23 Thread Yury Selivanov
Hi Jim, Sorry, I don't answer all questions/points directly. We are working on a new version of the PEP that will hopefully address most of them. Some comments inlined below: On Thu, Aug 24, 2017 at 12:32 AM, Jim J. Jewett wrote: [..] > I still don't see how this is

[Python-Dev] PEP 550 leak-in vs leak-out, why not just a ChainMap

2017-08-23 Thread Jim J. Jewett
In https://mail.python.org/pipermail/python-dev/2017-August/148869.html Nick Coghlan wrote: > * what we want to capture at generator creation time is > the context where writes will happen, and we also > want that to be the innermost context used for lookups So when creating a generator, we