diff --git a/models/match/multiview-simnet/evaluate_reader.py b/models/match/multiview-simnet/evaluate_reader.py index 8f68a5b4af5266e1730b3e5a562d7e3e410765bc..b3e7849fe4bc9a8766e4bab72f50e266d949dfc9 100644 --- a/models/match/multiview-simnet/evaluate_reader.py +++ b/models/match/multiview-simnet/evaluate_reader.py @@ -40,7 +40,7 @@ class Reader(ReaderBase): output = [(slot, []) for slot in self.all_slots] for elem in elements: slot, feasign = elem.split(':') - if not self._all_slots_dict.has_key(slot): + if slot not in self._all_slots_dict: continue self._all_slots_dict[slot][0] = True index = self._all_slots_dict[slot][1] diff --git a/models/match/multiview-simnet/reader.py b/models/match/multiview-simnet/reader.py index 9241d1e3cea1dc3d240b4770761f30834f6630ef..d3cb170f44127f6444405ea98f179c21691d678f 100644 --- a/models/match/multiview-simnet/reader.py +++ b/models/match/multiview-simnet/reader.py @@ -44,7 +44,7 @@ class Reader(ReaderBase): output = [(slot, []) for slot in self.all_slots] for elem in elements: slot, feasign = elem.split(':') - if not self._all_slots_dict.has_key(slot): + if slot not in self._all_slots_dict: continue self._all_slots_dict[slot][0] = True index = self._all_slots_dict[slot][1]