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/2011-May/111523.html below:

[Python-Dev] Don't set local variable in a list comprehension or generator

[Python-Dev] Don't set local variable in a list comprehension or generator [Python-Dev] Don't set local variable in a list comprehension or generatorskip at pobox.com skip at pobox.com
Fri May 20 01:47:57 CEST 2011
On 5/18/2011 10:19 AM, Nadeem Vawda wrote:

> I'm not sure why you would encounter code like that in the first place.
> Surely any code of the form:
> 
> ''.join(c for c in my_string)
> 
> would just return my_string? Or am I missing something?

You might more-or-less legitimately encounter it if the generator expression
originally contained a condition which got removed.

Skip
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