From ff6bb88bf5c369764704d1e94f0b4e5b4903c51b Mon Sep 17 00:00:00 2001 From: amandalund Date: Thu, 30 Mar 2017 21:20:01 -0500 Subject: [PATCH] Change Filter __hash__ to not use user-defined unique ID --- openmc/filter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openmc/filter.py b/openmc/filter.py index 4e1b4ccb99..ddd2e78bac 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -134,7 +134,9 @@ class Filter(object): return not self > other def __hash__(self): - return hash(repr(self)) + string = type(self).__name__ + '\n' + string += '{: <16}=\t{}\n'.format('\tBins', self.bins) + return hash(repr(string)) def __repr__(self): string = type(self).__name__ + '\n'