All instance functions of a class must take `self` as its first argument. It is implicitly passed.
Thus your code should be: class Rfuncs: def Integrate3a(self, exp1,exp2): ... On Thu, Oct 1, 2009 at 10:31 PM, Mikie <[email protected]> wrote: > > I have a class with a lot of def functions. It says 2 args. Right. > It says I am passing 3. > I am not a Python wizard. > Thanx > > Calling it with > > val31a=SR(request.args['Expression2'][0]) > val30a = SR(request.args['Var2'][0]) > s = Rfuncs() > ans=s.Integrate3a(val31a,val30a) > > class Rfuncs: > def Integrate3a(exp1,exp2): > eq11=exp1;w=b*1 #just an expression > w1=maxima.subst(eq11,b,w) > R1 = integral(exp1,exp2) > w2 = latex(eq11); w3 = "$"+w2+"$" > R2 = latex(R1);R3="$"+R2+"$"+"+ Constant" > Beq1="$\int" + w2 + "dx$" > #print Beq1 > str1="Calculate the following integral. \ > The default example is an expression you will need to do > partial \ > fraction decomposition, then integrate each of the parts. \ > Try the ParFrac function then try it on your own." > str2="The integral is :" > return str1,Beq1,str2,R3 > > > -- Tim Joseph Dumol <tim (at) timdumol (dot) com> --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
