#NEWLINE# def visitCodeBlock( self , block ) : #NEWLINE# #INDENT# if ( self . mixing > 0 ) : #NEWLINE# #INDENT# self . buffer ( '${caller.body() if caller else ""}' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . buffer ( ( '<%%block name="%s">' % block . name ) ) #NEWLINE# if ( block . mode == 'append' ) : #NEWLINE# #INDENT# self . buffer ( ( '${parent.%s()}' % block . name ) ) #NEWLINE# #UNINDENT# self . visitBlock ( block ) #NEWLINE# if ( block . mode == 'prepend' ) : #NEWLINE# #INDENT# self . buffer ( ( '${parent.%s()}' % block . name ) ) #NEWLINE# #UNINDENT# self . buffer ( '</%block>' )