#NEWLINE# def __eq__( self , other ) : #NEWLINE# #INDENT# if isinstance ( other , Monomial ) : #NEWLINE# #INDENT# exponents = other . exponents #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( other , ( tuple , Tuple ) ) : #NEWLINE# #INDENT# exponents = other #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return ( self . exponents == exponents )