#NEWLINE# def tag( self , name = None , compile_function = None ) : #NEWLINE# #INDENT# if ( ( name is None ) and ( compile_function is None ) ) : #NEWLINE# #INDENT# return self . tag_function #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( name is not None ) and ( compile_function is None ) ) : #NEWLINE# #INDENT# if callable ( name ) : #NEWLINE# #INDENT# return self . tag_function ( name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# def dec( func ) : #NEWLINE# #INDENT# return self . tag ( name , func ) #NEWLINE# #UNINDENT# return self #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( name is not None ) and ( compile_function is not None ) ) : #NEWLINE# #INDENT# self . tags [ name ] = compile_function #NEWLINE# return compile_function #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( 'Unsupported arguments to Library.tag: (%r, %r)' % ( name , compile_function ) ) )