A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-October/057178.html below:

[Python-Dev] problem with genexp

[Python-Dev] problem with genexp [Python-Dev] problem with genexpBrett Cannon bcannon at gmail.com
Tue Oct 11 07:10:18 CEST 2005
On 10/10/05, Neal Norwitz <nnorwitz at gmail.com> wrote:
> There's a problem with genexp's that I think really needs to get
> fixed.  See http://python.org/sf/1167751 the details are below.  This
> code:
>
> >>> foo(a = i for i in range(10))
>
> generates "NameError: name 'i' is not defined" when run because:
[SNIP]
> If you add parens around the code:   foo(a = i for i in range(10))
> You get something quite different:

Do you mean having ``(foo(a = i for i in range(10))``?  Otherwise I
see no difference when compared to the first value.

-Brett
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4