You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by al...@apache.org on 2019/01/16 19:38:37 UTC

[beam] branch master updated: Fix equality comparison to be against method invocation, not method object.

This is an automated email from the ASF dual-hosted git repository.

altay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 10bd150  Fix equality comparison to be against method invocation, not method object.
     new 18dcde2  Merge pull request #7522 from takidau/patch-1
10bd150 is described below

commit 10bd150ddeeabc676334eca38946225c7f340a48
Author: Tyler Akidau <ta...@apache.org>
AuthorDate: Tue Jan 15 16:02:57 2019 -0800

    Fix equality comparison to be against method invocation, not method object.
---
 sdks/python/apache_beam/coders/coders.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sdks/python/apache_beam/coders/coders.py b/sdks/python/apache_beam/coders/coders.py
index e329328..ff839d1 100644
--- a/sdks/python/apache_beam/coders/coders.py
+++ b/sdks/python/apache_beam/coders/coders.py
@@ -839,7 +839,7 @@ class TupleSequenceCoder(FastCoder):
 
   def __eq__(self, other):
     return (type(self) == type(other)
-            and self._elem_coder == other.value_coder)
+            and self._elem_coder == other.value_coder())
 
   def __hash__(self):
     return hash((type(self), self._elem_coder))
@@ -890,7 +890,7 @@ class IterableCoder(FastCoder):
 
   def __eq__(self, other):
     return (type(self) == type(other)
-            and self._elem_coder == other.value_coder)
+            and self._elem_coder == other.value_coder())
 
   def __hash__(self):
     return hash((type(self), self._elem_coder))