why I get ( TypeError: '>' not supported between instances of 'Monom' and 'Monom')
class Monom: def __init__(self ,coef, exp): if not ininstance(exp, coef) or exp<0: raise ValueError ('Illegal exponent') self.coef= coef self.exp=exp def __repr__(self): res= str(self.coef) + 'x^'+ str(self.exp) if self.coef ==0: res='0' if self.coef==1: res= 'x^' + str(self.exp) if self.exp==0: res= str(self.coef ) if self.exp== 1: res= str(self.coef) +'x' reter res def __It__(self,other) : if self.exp> other.exp: return True elif self.exp== other.exp: if self.coef>other.coef: return True return False .... well everything is going alright if i put( m1= Monom(4,6) i get m1= 4x^6) if m2=Monom(5,3) and I put (m2> m1) i get TypeError.. thanks,