tvalentyn commented on code in PR #23876:
URL: https://github.com/apache/beam/pull/23876#discussion_r1007453569


##########
sdks/python/apache_beam/pvalue.py:
##########
@@ -669,8 +669,8 @@ def __hash__(self):
     return hash(self.__dict__.items())
 
   def __eq__(self, other):
-    return type(self) == type(other) and all(
-        s == o for s, o in zip(self.__dict__.items(), other.__dict__.items()))
+    return (type(self) == type(other) and
+            self.__dict__.items() == other.__dict__.items())

Review Comment:
   I think we'd like to check the order in which elements were added to the 
dictionary as per https://github.com/apache/beam/pull/14156 . Is that the case, 
@TheNeuralBit ?
   
   If so, we could instead add another condition to make sure dicts has equal # 
of elements.
   Would be nice to add a unit test for this case as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to