diff --git a/libs/langgraph/langgraph/channels/binop.py b/libs/langgraph/langgraph/channels/binop.py index e7969a100..72e76c0a7 100644 --- a/libs/langgraph/langgraph/channels/binop.py +++ b/libs/langgraph/langgraph/channels/binop.py @@ -56,9 +56,11 @@ class BinaryOperatorAggregate(Generic[Value], BaseChannel[Value, Value, Value]): pass def __eq__(self, value: object) -> bool: - return ( - isinstance(value, BinaryOperatorAggregate) - and value.operator == self.operator + return isinstance(value, BinaryOperatorAggregate) and ( + value.operator is self.operator + if value.operator.__name__ != "" + and self.operator.__name__ != "" + else True ) @property