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/2000-July/007342.html below:

[Python-Dev] List comprehension syntax (Features for Python 2.0)

[Python-Dev] List comprehension syntax (Features for Python 2.0)Trent Mick trentm@ActiveState.com
Tue, 25 Jul 2000 11:00:00 -0700
On Tue, Jul 25, 2000 at 06:59:55PM +0200, M . -A . Lemburg wrote:
> Wouldn't it make much more sense to write something
> more lambda function like, e.g.
> 
>     [for (x,y) in zip([10,20,30], [1,2,3]): x+y]

or

[for x in [10,20,30]: for y in [1,2,3]: x+y]

> 
> or
> 
>     [for x in range(100): x*2]
> 
<snip>

> List comprehension would then become something like:
> 
>     [for <vars> in <expr>: <evaluated expr>]
> 

For what it is worth, I like that. I can easily digest either though, so I
think that this is a question for user testing.

Trent

-- 
Trent Mick
TrentM@ActiveState.com



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