Skip to content

Commit

Permalink
Loopy persistent key builder: just use existing frozen dict hash impl
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jul 3, 2024
1 parent 913e360 commit 3773a4b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions loopy/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,8 @@ class LoopyKeyBuilder(KeyBuilderBase):
update_for_list = KeyBuilderBase.update_for_tuple
update_for_set = KeyBuilderBase.update_for_frozenset

def update_for_dict(self, key_hash, key):
from pytools import unordered_hash
unordered_hash(
key_hash,
(self.rec(self.new_hash(), (k, v)).digest()
for k, v in key.items()))

update_for_defaultdict = update_for_dict
update_for_dict = KeyBuilderBase.update_for_immutabledict
update_for_defaultdict = KeyBuilderBase.update_for_immutabledict

def update_for_BasicSet(self, key_hash, key): # noqa
from islpy import Printer
Expand Down

0 comments on commit 3773a4b

Please sign in to comment.