1
0
forked from VimPlug/jedi

lambdas: add correct parents and change evaluate

This commit is contained in:
David Halter
2012-12-22 19:43:30 +01:00
parent 77b2ea2dce
commit e701a4ef92
2 changed files with 6 additions and 2 deletions

View File

@@ -1546,7 +1546,11 @@ class PyFuzzyParser(object):
lambd = Lambda(self.module, params, start_pos)
ret, tok = self._parse_statement(added_breaks=[','])
if ret is not None:
ret.parent = lambd
lambd.returns.append(ret)
lambd.parent = self.scope
tok_list[-1] = lambd
continue
elif token_type == tokenize.NAME:
if tok == 'for':
# list comprehensions!