def _name_to_index(cursor, table_name):
 return dict([(d[0], i) for (i, d) in enumerate(get_table_description(cursor, table_name))])

def _name_to_index ( cursor , table_name ) : return dict ( [ ( d [ 0 ] , i ) for ( i , d ) in enumerate ( get_table_description ( cursor , table_name ) ) ] )
returns a dictionary of {field_name: field_index} for the given table .