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/006071.html below:

[Python-Dev] list comprehensions again...

[Python-Dev] list comprehensions again...Guido van Rossum guido@beopen.com
Tue, 11 Jul 2000 09:40:32 -0500
>    [x,y for x in (1,2,3) for y in (4,5,6)]

Hm, I suppose the programmer meant the same as

    [(x,y) for x in (1,2,3) for y in (4,5,6)]

Would it be really bad if we forced them to write it that way?

Side note: the suggested syntax here (for i in seq1 for j in seq2)
looks like a potential alternative for the currently proposed parallel
for loop syntax (for i in seq1; j in seq2).

Only problem: the for-for variant could be mistaken by someone used to
see nested loops as meaning the same as

    for i in seq1:
	for j in seq2: ...

Undecided and unhelpful,

--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)



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