A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-May/015138.html below:

[Python-Dev] Iteration variables and list comprehensions

[Python-Dev] Iteration variables and list comprehensions [Python-Dev] Iteration variables and list comprehensionsTim Peters tim_one@email.msn.com
Thu, 31 May 2001 02:20:21 -0400
[Greg Ewing]
> If we do this, we also need to consider whether we want
> to make the corresponding change to regular for-loops.
> Seems to me that all the reasons it's a good idea for
> listcomps apply to for-loops as well.

I expect there's no chance:  unlike listcomps, for-loops allow break
statements, and search loops that use the for index after a break (and out
of the loop!) are common.

> Another advantage of changing both together is that
> we can continue to describe listcomp semantics in terms
> of for-loops

But I'm afraid that's also an advantage of leaving both alone.

> instead of lambdas.
>
> Then we won't have to go into hiding until Guido dies or lifts
> the fatwah against us.

Death won't stop him -- he's Dutch <wink>.




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