sgzwiz / brython

Automatically exported from code.google.com/p/brython
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

List comprehension fails with conditions (parsing issue) #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Code:
e = [ 0, 2, 4, 6 ]
r = [ 0, 1, 2, 3, 4, 5 ]
x = [ i for i in r if i in e ]

Last line is expanded as:
x =$list_comp([["i","r"]],"i","i ine",['r',r])

Notice condition looks wrong: "i ine"

Original issue reported on code.google.com by pedro.ro...@gmail.com on 5 Jan 2013 at 1:25

GoogleCodeExporter commented 9 years ago
Fixed in rev #340

Original comment by pierre.q...@gmail.com on 6 Jan 2013 at 8:07