def dict_factory(crs, row):
    return dict(
        ((col[0], row[idx]) for idx, col in enumerate(crs.description)))
This should only be used when you need a real dict,
dataset/ETHPy150Open openstack/swift/swift/common/db.py/dict_factory