hash the tuple of hashes to id the current params
authorJosh Blum <josh@joshknows.com>
Fri, 25 Sep 2009 19:54:33 +0000 (12:54 -0700)
committerJosh Blum <josh@joshknows.com>
Fri, 25 Sep 2009 19:54:33 +0000 (12:54 -0700)
grc/base/Block.py

index 203e878e400650105806d155ec243483c3cacd4c..b2015cc403ec4f5cffab3284e82311f8e350fb74 100644 (file)
@@ -239,7 +239,7 @@ class Block(Element):
                that are needed for the connections creation phase.
                @param n the nested data odict
                """
-               get_hash = lambda: reduce(lambda x, y: x ^ y, [hash(param) for param in self.get_params()], 0)
+               get_hash = lambda: hash(tuple(map(hash, self.get_params())))
                my_hash = 0
                while get_hash() != my_hash:
                        params_n = n.findall('param')