[Python-ideas] Fixing class scope brainstorm

Ivan Levkivskyi levkivskyi at gmail.com
Tue Mar 27 14:12:46 EDT 2018


On 27 March 2018 at 18:19, Guido van Rossum <guido at python.org> wrote:

> On Tue, Mar 27, 2018 at 6:56 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
>> [...] The implicit functions used in the
>> comprehension & generator expression cases are just potentially
>> simpler to handle, as we don't care about their API signatures, which
>> means we can freely pollute their APIs with eager name bindings if we
>> choose to do so. [...]
>>
>
> Hm, so maybe we shouldn't touch lambda, but we can at least fix the scope
> issues for comprehensions and genexprs.
>

Removing the implicit function scope in comprehensions is something I
wanted for long time.
It would not only "fix" the scoping, but will also fix the yield inside
comprehensions.

--
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180327/bbadafbd/attachment.html>


More information about the Python-ideas mailing list