def named_tuple_factory(colnames, rows):
 clean_column_names = map(_clean_column_name, colnames)
 try:
  Row = namedtuple('Row', clean_column_names)
 except Exception:
  clean_column_names = list(map(_clean_column_name, colnames))
  log.warning(('Failed creating named tuple for results with column names %s (cleaned: %s) (see Python \'namedtuple\' documentation for details on name rules). Results will be returned with positional names. Avoid this by choosing different names, using SELECT "<col name>" AS aliases, or specifying a different row_factory on your Session' % (colnames, clean_column_names)))
  Row = namedtuple('Row', _sanitize_identifiers(clean_column_names))
 return [Row(*row) for row in rows]

def named_tuple_factory ( colnames , rows ) : clean_column_names = map ( _clean_column_name , colnames ) try : Row = namedtuple ( 'Row' , clean_column_names ) except Exception : clean_column_names = list ( map ( _clean_column_name , colnames ) ) log . warning ( ( 'Failed creating named tuple for results with column names %s (cleaned: %s) (see Python \'namedtuple\' documentation for details on name rules). Results will be returned with positional names. Avoid this by choosing different names, using SELECT "<col name>" AS aliases, or specifying a different row_factory on your Session' % ( colnames , clean_column_names ) ) ) Row = namedtuple ( 'Row' , _sanitize_identifiers ( clean_column_names ) ) return [ Row ( * row ) for row in rows ]
returns each row as a namedtuple <URL#collections .