Message29136
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. :-) |
|
| Date |
User |
Action |
Args |
| 2007-08-23 14:41:17 | admin | link | issue1520864 messages |
| 2007-08-23 14:41:17 | admin | create | |
|