1
0
forked from VimPlug/jedi

further test for list comprehensions

This commit is contained in:
Dave Halter
2014-06-12 11:20:46 +02:00
parent d5758adb2b
commit 371ec888e9
2 changed files with 5 additions and 1 deletions

View File

@@ -88,6 +88,9 @@ class _RecursionNode(object):
if not other: if not other:
return None return None
# List Comprehensions start on the same line as its statement.
# Therefore we have the unfortunate situation of the same start_pos for
# two statements.
is_list_comp = lambda x: isinstance(x, pr.ListComprehension) is_list_comp = lambda x: isinstance(x, pr.ListComprehension)
return self.script == other.script \ return self.script == other.script \
and self.position == other.position \ and self.position == other.position \

View File

@@ -400,7 +400,8 @@ third()[0]
# ----------------- # -----------------
def from_comprehension(foo): def from_comprehension(foo):
#? float() #? int() float()
return foo return foo
[from_comprehension(1.0) for n in (1,)] [from_comprehension(1.0) for n in (1,)]
[from_comprehension(n) for n in (1,)]