提交 67398f35 authored 作者: John Salvatier's avatar John Salvatier

slices now can be compared

上级 7b50b3dc
...@@ -7214,6 +7214,12 @@ class MakeSlice(Op): ...@@ -7214,6 +7214,12 @@ class MakeSlice(Op):
def __str__(self): def __str__(self):
return self.__class__.__name__ return self.__class__.__name__
def __eq__(self, other):
return type(self) == type(other)
def __hash__(self):
return hash(type(self))
make_slice = MakeSlice() make_slice = MakeSlice()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论