def _init_tbl_columns(self): keys = [] data = [] for k,v in tbl.items(): if v[0]: data.append((v[1], v[2])) keys.append((v[1], k)) return ([k for (id,k) in sorted(keys)], [d for (id,d) in sorted(data)])
def _init_tbl_columns(): columns = [] for k,v in tbl.items(): if v[0]: columns.append((v[1], k)) return [hdr for (id,hdr) in sorted(columns)]