[Python-Dev] Informal educator feedback on PEP 572 (was Re: 2018 Python Language Summit coverage, last part)
ncoghlan at gmail.com
Mon Jun 25 08:35:00 EDT 2018
On 25 June 2018 at 09:02, Guido van Rossum <guido at python.org> wrote:
> On Sun, Jun 24, 2018 at 11:50 AM Steven D'Aprano <steve at pearwood.info>
>> 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
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).
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev