On 25 June 2018 at 09:02, Guido van Rossum
On Sun, Jun 24, 2018 at 11:50 AM Steven D'Aprano
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-7a25ca1769914c1141cb5c63d... 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 | ncoghlan@gmail.com | Brisbane, Australia