def has_edge ( self , edge ) : u , v = edge return ( u , v ) in self . edge_properties
python networkx check edge attribute exist
Return whether an edge exists .
def has_edge(self, edge):
        """
        Return whether an edge exists.

        @type  edge: tuple
        @param edge: Edge.

        @rtype:  boolean
        @return: Truth-value for edge existence.
        """
        u, v = edge
        return (u, v) in self.edge_properties