On 25 June 2018 at 09:02, Guido van Rossum <gu...@python.org> wrote:
> On Sun, Jun 24, 2018 at 11:50 AM Steven D'Aprano <st...@pearwood.info>
> wrote:
>> I will have more to say about the whole "comprehensions are their own
>> scope" issue later. But I'd like to see Nick's proposed PEP, or at least
>> a draft of it, before making any final decisions.
>
>
> Agreed, though I assume it's just `given` again.

While I still have some TODO notes of my own to resolve before posting
it to python-ideas, the examples section at
https://github.com/ncoghlan/peps/pull/2/files#diff-7a25ca1769914c1141cb5c63dc781f32R202
already gives a pretty good idea of the differences relative to PEP
572: rebinding existing names is unchanged from PEP 572, but
introducing new names requires a bit of "Yes, I really do want to
introduce this new name here" repetition.

The big difference from previous iterations of the "given" idea is
that it doesn't try to completely replace the proposed inline
assignments, it just supplements them by providing a way to do inline
name *declarations* (which may include declaring targets as global or
nonlocal, just as regular function level declarations can).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to