Author atuining
Recipients
Date 2006-07-11.23:21:13
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The following code works differently in Python 2.5 than
Python 2.4:

x = [(1,), (2,), (3,)]
for y, in x:
    print y

In Python 2.4, this code produces the following:
1
2
3

In Python 2.5, this code produces the following:
(1,)
(2,)
(3,)

Interestingly enough the following code:

x = (1,)
y, = x
print y

produces the output
1

in both Python 2.4 and Python 2.5. I'm thinking this is
not intentional. :-)
History
Date User Action Args
2007-08-23 14:41:17adminlinkissue1520864 messages
2007-08-23 14:41:17admincreate