def funcstr(leaves, expr):
 (result, scope) = print_python(leaves, expr)
 leaf_names = [print_python([leaf], leaf)[0] for leaf in leaves]
 return (('lambda %s: %s' % (', '.join(leaf_names), result)), scope)

def funcstr ( leaves , expr ) : ( result , scope ) = print_python ( leaves , expr ) leaf_names = [ print_python ( [ leaf ] , leaf ) [ 0 ] for leaf in leaves ] return ( ( 'lambda %s: %s' % ( ', ' . join ( leaf_names ) , result ) ) , scope )
lambda string for an expresion .