forked from VimPlug/jedi
further test for list comprehensions
This commit is contained in:
@@ -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 \
|
||||||
|
|||||||
@@ -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,)]
|
||||||
|
|||||||
Reference in New Issue
Block a user