[Python-Dev] FW: list-display semantics?

Tim Peters tim.one@home.com
Sun, 10 Jun 2001 15:36:50 -0400


I opened a bug on this:

<http://sf.net/tracker/index.php?func=detail&aid=431886&group_id=5470&atid=1
05470>

If anyone's keen to play with the grammar, have at it!  Everyone at
PythonLabs would +1 it.

-----Original Message-----
From: python-list-admin@python.org
[mailto:python-list-admin@python.org]On Behalf Of jainweiwu
Sent: Sunday, June 10, 2001 2:30 PM
To: python-list@python.org
Subject: list-display semantics?


Hi all:
I tried the one-line command in a interaction mode:
[x for x in [1, 2, 3], y for y in [4, 5, 6]]
and the result surprised me, that is:
[[1,2,3],[1,2,3],[1,2,3],9,9,9]
Who can explain the behavior?
Since I expected the result should be:
[[1,4],[1,5],[1,6],[2,4],...]
--
Pary All Rough Yet.
parywu@seed.net.tw


--
http://mail.python.org/mailman/listinfo/python-list