(self, other)
Return whether this graph is equal to another one.
        
        @type other: graph, digraph
        @param other: Other graph or digraph
        
        @rtype: boolean
        @return: Whether this graph and the other are equal.
Return whether this graph is equal to another one.
Return whether this graph is equal to another one .
def __eq__(self, other):
        """
        Return whether this graph is equal to another one.
        
        @type other: graph, digraph
        @param other: Other graph or digraph
        
        @rtype: boolean
        @return: Whether this graph and the other are equal.
        """
        
        def nodes_eq():
            for each in self:
                if (not other.has_node(each)): return False
            for each in other:
                if (not self.has_node(each)): return False
            return True
        
        def edges_eq():
            for edge in self.edges():
                    if (not other.has_edge(edge)): return False
            for edge in other.edges():
                    if (not self.has_edge(edge)): return False
            return True
        
        try:
            return nodes_eq() and edges_eq()
        except AttributeError:
            return False
def __eq__ ( self , other ) : def nodes_eq ( ) : for each in self : if ( not other . has_node ( each ) ) : return False for each in other : if ( not self . has_node ( each ) ) : return False return True def edges_eq ( ) : for edge in self . edges ( ) : if ( not other . has_edge ( edge ) ) : return False for edge in other . edges ( ) : if ( not self . has_edge ( edge ) ) : return False return True try : return nodes_eq ( ) and edges_eq ( ) except AttributeError : return False