Don't collapse the tuple into a hash, since dict can use __eq__ to avoid problems...
authorZac Medico <zmedico@gentoo.org>
Sun, 10 Dec 2006 19:41:18 +0000 (19:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 10 Dec 2006 19:41:18 +0000 (19:41 -0000)
svn path=/main/trunk/; revision=5262

pym/portage_dep.py

index 5eacb8368c2af08c1d90ef8204698ef7228e370e..a3186e8f1702b5b114cdc9c9ed78dff38cc9fd22 100644 (file)
@@ -501,8 +501,8 @@ def match_from_list(mydep, candidate_list):
        """
 
        global _match_from_list_cache
-       mylist = _match_from_list_cache.get(
-               hash((mydep, tuple(candidate_list))), None)
+       cache_key = (mydep, tuple(candidate_list))
+       mylist = _match_from_list_cache.get(cache_key, None)
        if mylist is not None:
                return mylist[:]
 
@@ -601,5 +601,5 @@ def match_from_list(mydep, candidate_list):
        else:
                raise KeyError("Unknown operator: %s" % mydep)
 
-       _match_from_list_cache[hash((mydep, tuple(candidate_list)))] = mylist
+       _match_from_list_cache[cache_key] = mylist
        return mylist