#NEWLINE# def add_user_function( self , func , fndesc , libs = ( ) ) : #NEWLINE# #INDENT# if ( fndesc not in self . _defns ) : #NEWLINE# #INDENT# msg = '{func} is not a registered user function' #NEWLINE# raise KeyError ( msg . format ( func = func ) ) #NEWLINE# #UNINDENT# impl = user_function ( fndesc , libs ) #NEWLINE# self . _defns [ func ] . append ( impl , impl . signature )