def __fetch_to_object(self, fetchresult, return_one=False): """ fetch[0]: id_championnat fetch[1]: id_equipe fetch[2]: id_equipe_exterieur fetch[3]: id_match fetch[4]: date_match fetch[5]: commentaire_match fetch[6]: isplayed_match :param fetchresult: :param return_one: :return: """ liste = [] try: if len(fetchresult) > 0: for fetch in fetchresult: obj = Match(fetch[1], fetch[2], fetch[4], fetch[5], fetch[6]) obj.id = fetch[3] liste.append(obj) return liste if not return_one else liste[0] else: return None except Exception as ex: DAOException(self, ex)