From 96f260ba2ba25facea311ecc4d1e85d0ae628478 Mon Sep 17 00:00:00 2001 From: yinhaofeng <1841837261@qq.com> Date: Sun, 23 Aug 2020 04:08:12 +0000 Subject: [PATCH] change --- models/match/multiview-simnet/evaluate_reader.py | 2 +- models/match/multiview-simnet/reader.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/match/multiview-simnet/evaluate_reader.py b/models/match/multiview-simnet/evaluate_reader.py index 8f68a5b4..b3e7849f 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 9241d1e3..d3cb170f 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] -- GitLab