#NEWLINE# def anonymous_function( self , node , indent ) : #NEWLINE# #INDENT# params = ', ' . join ( map ( self . _generate_node , node . params ) ) #NEWLINE# lambda_head = ( 'lambda%s:' % ( ( ' ' + params ) if params else '' ) ) #NEWLINE# if ( not node . block ) : #NEWLINE# #INDENT# return ( '%s pass' % lambda_head ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( len ( node . block ) == 1 ) and ( node . block [ 0 ] . type in EXPRESSION_TYPES ) ) : #NEWLINE# #INDENT# if ( ( node . block [ 0 ] . type == 'implicit_return' ) or ( node . block [ 0 ] . type == 'explicit_return' ) ) : #NEWLINE# #INDENT# block = node . block [ 0 ] . value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# block = node . block [ 0 ] #NEWLINE# #UNINDENT# return ( '%s %s' % ( lambda_head , self . _generate_node ( block ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# name = ( 'a_%d' % len ( self . a ) ) #NEWLINE# block = [ ( self . offset ( 1 ) + self . _generate_node ( z ) ) for z in node . block ] #NEWLINE# code = ( 'def %s(%s):\n%s\n' % ( name , params , '\n' . join ( block ) ) ) #NEWLINE# self . a . append ( block ) #NEWLINE# return name