(self, other)
return result
Removes the given object(s) from the graph

        @param other: if it is an integer, removes the vertex with the given
          ID from the graph (note that the remaining vertices will get
          re-indexed!). If it is a tuple, removes the given edge. If it is
          a graph, takes the difference of the two graphs. Accepts
          lists of integers or lists of tuples as well, but they can't be
          mixed! Also accepts L{Edge} and L{EdgeSeq} objects.
Removes the given object(s) from the graph
Removes the given object ( s ) from the graph
def __sub__(self, other):
        """Removes the given object(s) from the graph

        @param other: if it is an integer, removes the vertex with the given
          ID from the graph (note that the remaining vertices will get
          re-indexed!). If it is a tuple, removes the given edge. If it is
          a graph, takes the difference of the two graphs. Accepts
          lists of integers or lists of tuples as well, but they can't be
          mixed! Also accepts L{Edge} and L{EdgeSeq} objects.
        """
        if isinstance(other, Graph):
            return self.difference(other)

        result = self.copy()
        if isinstance(other, (int, str)):
            result.delete_vertices([other])
        elif isinstance(other, tuple) and len(other) == 2:
            result.delete_edges([other])
        elif isinstance(other, list):
            if len(other) > 0:
                if isinstance(other[0], tuple):
                    result.delete_edges(other)
                elif isinstance(other[0], (int, str)):
                    result.delete_vertices(other)
                else:
                    return NotImplemented
            else:
                return result
        elif isinstance(other, Vertex):
            result.delete_vertices(other)
        elif isinstance(other, VertexSeq):
            result.delete_vertices(other)
        elif isinstance(other, Edge):
            result.delete_edges(other)
        elif isinstance(other, EdgeSeq):
            result.delete_edges(other)
        else:
            return NotImplemented

        return result
def __sub__ ( self , other ) : if isinstance ( other , Graph ) : return self . difference ( other ) result = self . copy ( ) if isinstance ( other , ( int , str ) ) : result . delete_vertices ( [ other ] ) elif isinstance ( other , tuple ) and len ( other ) == 2 : result . delete_edges ( [ other ] ) elif isinstance ( other , list ) : if len ( other ) > 0 : if isinstance ( other [ 0 ] , tuple ) : result . delete_edges ( other ) elif isinstance ( other [ 0 ] , ( int , str ) ) : result . delete_vertices ( other ) else : return NotImplemented else : return result elif isinstance ( other , Vertex ) : result . delete_vertices ( other ) elif isinstance ( other , VertexSeq ) : result . delete_vertices ( other ) elif isinstance ( other , Edge ) : result . delete_edges ( other ) elif isinstance ( other , EdgeSeq ) : result . delete_edges ( other ) else : return NotImplemented return result