

def all_to_dicts(cur=None, rows=None, col_names=None):
    'Fetch all rows from a cursor and make them as dicts in a list.\n\n    If `col_names` or `rows` is provided, it will be used first.\n\n    :rtype: dicts in list\n    '
    if (col_names is None):
        assert (cur is not None), 'You must specify cur or col_names.'
        col_names = extract_col_names(cur)
    if (rows is None):
        assert (cur is not None), 'You must specify cur or rows.'
        rows = cur
    return [dict(izip(row, row)) for row in rows]

dataset/ETHPy150Open moskytw/mosql/mosql/db.py all_to_dicts/VarMisuse@79/197 `col_names`->`row`