1
0
forked from VimPlug/jedi

fixed mostly wrong lambda tests (and a few lambda improvements as well)

This commit is contained in:
David Halter
2012-12-23 15:52:49 +01:00
parent c7fd196850
commit 716d2362fd
3 changed files with 16 additions and 7 deletions

View File

@@ -445,6 +445,10 @@ class Lambda(Function):
string = "lambda %s:" % params
return string + super(Function, self).get_code(indention=indention)
def __repr__(self):
return "<%s @%s (%s-%s)>" % (type(self).__name__, self.start_pos[0],
self.start_pos[1], self.end_pos[1])
class Flow(Scope):
"""
@@ -1551,6 +1555,7 @@ class PyFuzzyParser(object):
if ret is not None:
ret.parent = lambd
lambd.returns.append(ret)
lambd.end_pos = ret.end_pos
lambd.parent = self.scope
tok_list[-1] = lambd
continue