pages/element_with_traits.py
def evaluate_traits(self):
        """
        Evaluates traits and returns a list containing the description of traits which are not true.
        Notice that if LAZY_EVALUATION is set to False all traits are evaluated before returning. Use this option
        only for debugging purposes.
        """
        return_value = []
        for trait in self.traits:
            if not trait.condition():
                if not self.traits_eager_evaluation:
                    return [trait.description]
                else:
                    return_value.append(trait.description)
        return return_value
def evaluate_traits(self):
        """
        Evaluates traits and returns a list containing the description of traits which are not true.
        Notice that if LAZY_EVALUATION is set to False all traits are evaluated before returning. Use this option
        only for debugging purposes.
        """
        return_value = []
        for trait in self.traits:
            if not trait.condition():
                if not self.traits_eager_evaluation:
                    return [trait.description]
                else:
                    return_value.append(trait.description)
        return return_value
Evaluates traits and returns a list containing the description of traits which are not true.
        Notice that if LAZY_EVALUATION is set to False all traits are evaluated before returning. Use this option
        only for debugging purposes.