(self, other)
return nodes_eq() and edges_eq()
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 attrs_eq(list1, list2):
            for each in list1:
                if (each not in list2): return False
            for each in list2:
                if (each not in list1): return False
            return True
        
        def edges_eq():
            for edge in self.edges():
                if (self.edge_weight(edge) != other.edge_weight(edge)): return False
                if (self.edge_label(edge) != other.edge_label(edge)): return False
                if (not attrs_eq(self.edge_attributes(edge), other.edge_attributes(edge))): return False 
            return True
        
        def nodes_eq():
            for node in self:
                if (not attrs_eq(self.node_attributes(node), other.node_attributes(node))): return False 
            return True
        
        return nodes_eq() and edges_eq()
def __eq__ ( self , other ) : def attrs_eq ( list1 , list2 ) : for each in list1 : if ( each not in list2 ) : return False for each in list2 : if ( each not in list1 ) : return False return True def edges_eq ( ) : for edge in self . edges ( ) : if ( self . edge_weight ( edge ) != other . edge_weight ( edge ) ) : return False if ( self . edge_label ( edge ) != other . edge_label ( edge ) ) : return False if ( not attrs_eq ( self . edge_attributes ( edge ) , other . edge_attributes ( edge ) ) ) : return False return True def nodes_eq ( ) : for node in self : if ( not attrs_eq ( self . node_attributes ( node ) , other . node_attributes ( node ) ) ) : return False return True return nodes_eq ( ) and edges_eq ( )