1
0
forked from VimPlug/jedi

Lambda class

This commit is contained in:
David Halter
2012-12-22 19:08:37 +01:00
parent 3fbf66f42c
commit ef1f637e71

View File

@@ -432,6 +432,16 @@ class Function(Scope):
return '%s\n\n%s' % (self.get_call_signature(), self.docstr)
class Lambda(Function):
def __init__(self, module, params, start_pos):
super(Lambda, self).__init__(module, None, params, start_pos, None)
def get_code(self, first_indent=False, indention=' '):
params = ','.join([stmt.code for stmt in self.params])
string = "lambda %s:" % params
return string + super(Function, self).get_code(indention=indention)
class Flow(Scope):
"""
Used to describe programming structure - flow statements,