(self, other)
return True
Returns true iff this tag has the same name, the same attributes,
        and the same contents (recursively) as the given tag.
Returns true iff this tag has the same name, the same attributes,
        and the same contents (recursively) as the given tag.
Returns true iff this tag has the same name the same attributes and the same contents ( recursively ) as the given tag .
def __eq__(self, other):
        """Returns true iff this tag has the same name, the same attributes,
        and the same contents (recursively) as the given tag."""
        if self is other:
            return True
        if (not hasattr(other, 'name') or
            not hasattr(other, 'attrs') or
            not hasattr(other, 'contents') or
            self.name != other.name or
            self.attrs != other.attrs or
            len(self) != len(other)):
            return False
        for i, my_child in enumerate(self.contents):
            if my_child != other.contents[i]:
                return False
        return True
def __eq__ ( self , other ) : if self is other : return True if ( not hasattr ( other , 'name' ) or not hasattr ( other , 'attrs' ) or not hasattr ( other , 'contents' ) or self . name != other . name or self . attrs != other . attrs or len ( self ) != len ( other ) ) : return False for i , my_child in enumerate ( self . contents ) : if my_child != other . contents [ i ] : return False return True