diff --git a/pddl/logic/predicates.py b/pddl/logic/predicates.py index 2760135..c039ada 100644 --- a/pddl/logic/predicates.py +++ b/pddl/logic/predicates.py @@ -171,6 +171,14 @@ def __repr__(self) -> str: """Get the string representation.""" return f"{type(self).__name__}({self.predicate}, {self.condition})" + def __eq__(self, other): + """Override equal operator.""" + return ( + isinstance(other, DerivedPredicate) + and self.predicate == other.predicate + and self.condition == other.condition + ) + def __lt__(self, other): """Compare with another object.""" if isinstance(other, DerivedPredicate):