M
Maric Michaud
I faced a strange behavior with generator expression, which seems like a bug, for both
python 2.4 and 2.5 :
.... a = 1, 2, 3
.... b = 1, 2, 3
.... C = list((e,f) for e in a for f in b)
....
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in A
.... a = 1, 2, 3
.... b = 1, 2, 3
.... C = [ (e,f) for e in a for f in b ]
....[(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)]
Any comment ? I'm ready to report it as a bug if there is no objection.
python 2.4 and 2.5 :
.... a = 1, 2, 3
.... b = 1, 2, 3
.... C = list((e,f) for e in a for f in b)
....
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 4, in A
.... a = 1, 2, 3
.... b = 1, 2, 3
.... C = [ (e,f) for e in a for f in b ]
....[(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)]
Any comment ? I'm ready to report it as a bug if there is no objection.