(model, start, end)
Delete the start, end slice (rows) from the model.
Delete the start, end slice (rows) from the model.
Delete the start end slice ( rows ) from the model .
def delslice(model, start, end):
    """ Delete the start, end slice (rows) from the model.
    """
    if isinstance(model, PyListModel):
        del model[start:end]
    elif isinstance(model, QAbstractItemModel):
        model.removeRows(start, end - start)
    else:
        raise TypeError(type(model))
def delslice ( model , start , end ) : if isinstance ( model , PyListModel ) : del model [ start : end ] elif isinstance ( model , QAbstractItemModel ) : model . removeRows ( start , end - start ) else : raise TypeError ( type ( model ) )