Skip to content
Snippets Groups Projects
Commit 4333fe0d authored by Martin Reinecke's avatar Martin Reinecke
Browse files

tweaks

parent 45beef3e
No related branches found
No related tags found
1 merge request!273Subset tweaks
Pipeline #
......@@ -182,7 +182,7 @@ class MultiField(object):
if len(set(self._domain.keys()) - set(other._domain.keys())) > 0:
return False
for key in self._domain.keys():
if other._domain[key] != self._domain[key]:
if other._domain[key] is not self._domain[key]:
return False
if not other[key].isSubsetOf(self[key]):
return False
......@@ -223,9 +223,11 @@ for op in ["__add__", "__radd__",
pass
else:
for key in only_self_keys:
result_val[key] = getattr(self[key], op)(self[key]*0.)
result_val[key] = getattr(
self[key], op)(self[key]*0.)
for key in only_other_keys:
result_val[key] = getattr(other[key]*0., op)(other[key])
result_val[key] = getattr(
other[key]*0., op)(other[key])
else:
result_val = {key: getattr(val, op)(other)
for key, val in self.items()}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment