Fix python 3 set comprehension and ...

Add a few set/list comprehension offsets for Python 3
This commit is contained in:
rocky
2016-06-06 17:03:37 -04:00
parent 4f8714ff4c
commit 70d4841a6a
7 changed files with 88 additions and 49 deletions

View File

@@ -20,6 +20,14 @@ def for_range_stmt():
for i in range(2):
i+1
# FIXME: add this test
def set_comp():
{y for y in range(3)}
# FIXME: add this test
def list_comp():
[y for y in range(3)]
def get_parsed_for_fn(fn):
code = fn.__code__ if PYTHON3 else fn.func_code
return deparse(PYTHON_VERSION, code)