class Base: # Contains object id id = 0 # Contains object id created to database idDataBase = 0 # Contains all de object children child = [] # Contains name name = "" # Contains errors error = None def __init__(self): pass def add_error(self, err): """ Add errors to property error :param err: Constains a string with error description """ if not self.error: self.error = [] self.error.append(err)