Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Multiple list comprehensions on one line fail to find local variables #853

Open
abrunyate opened this issue Jun 29, 2018 · 0 comments
Open

Comments

@abrunyate
Copy link

The code

def fun():
  x=2
  L=([x for i in range(4)], [j for j in range(4)])

fun()

does not execute, since the x in the first comprehension is not resolved. The compiler does produce a warning, but it's hard to spot high up in the tool chain (it went unnoticed when using briefcase->android). Splitting the line, of course, fixes the problem.

I don't know enough about how VOC works yet to know how hard it would be to enhance the keys to the code object dictionary (if indeed this is the solution).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant