#NEWLINE# def __eq__( self , rhs ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return isinstance ( rhs , self . klass ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# return ( type ( rhs ) == type ( self . klass ) )