提交 b6da81cb authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Add a default __str__ for Ops

上级 3b852d91
...@@ -545,6 +545,9 @@ class Op(MetaObject): ...@@ -545,6 +545,9 @@ class Op(MetaObject):
) )
return self.make_py_thunk(node, storage_map, compute_map, no_recycling) return self.make_py_thunk(node, storage_map, compute_map, no_recycling)
def __str__(self):
return getattr(type(self), "__name__", super().__str__())
class COp(Op, CLinkerOp): class COp(Op, CLinkerOp):
"""An `Op` with a C implementation.""" """An `Op` with a C implementation."""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论