#NEWLINE# def _eval_derivative( self , s ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# res = 0 #NEWLINE# if ( self . args [ 0 ] . has ( s ) or self . args [ 1 ] . has ( s ) ) : #NEWLINE# #INDENT# for ( i , p ) in enumerate ( self . _diffargs ) : #NEWLINE# #INDENT# m = self . _diffargs [ i ] . diff ( s ) #NEWLINE# if ( i != 0 ) : #NEWLINE# #INDENT# res += ( self . fdiff ( ( 1 , i ) ) * m ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ( res + ( self . fdiff ( 3 ) * self . args [ 2 ] . diff ( s ) ) ) #NEWLINE# #UNINDENT# except ( ArgumentIndexError , NotImplementedError ) : #NEWLINE# #INDENT# return Derivative ( self , s )