提交 48661f10 authored 作者: Ramana.S's avatar Ramana.S

Reverted suggested changes

上级 4936e630
......@@ -509,7 +509,7 @@ class FromFunctionOp(gof.Op):
self.infer_shape = self._infer_shape
def __eq__(self, other):
return (isinstance(self, type(other)) and
return (type(self) == type(other) and
self.__fn == other.__fn)
def __hash__(self):
......
......@@ -835,7 +835,7 @@ class Op(utils.object2, PureOp, CLinkerOp):
def __eq__(self, other):
if hasattr(self, '__props__'):
return (isinstance(self, type(other))
return (type(self) == type(other)
and self._props() == other._props())
else:
return NotImplemented
......
......@@ -29,7 +29,7 @@ class MyType(Type):
self.thingy = thingy
def __eq__(self, other):
return isinstance(other, type(self)) and other.thingy == self.thingy
return type(other) == type(self) and other.thingy == self.thingy
def __str__(self):
return str(self.thingy)
......@@ -229,7 +229,7 @@ class TestMakeThunk(unittest.TestCase):
required = thunk()
# Check everything went OK
assert not required # We provided all inputs
assert compute_map[o][0]
assert compute_map[o][0]
assert storage_map[o][0] == 4
else:
self.assertRaises((NotImplementedError, utils.MethodNotDefined),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论