提交 feedbb19 authored 作者: notoraptor's avatar notoraptor

Simplify and secure code.

Let exceptions raise freely (for better debugging).
上级 72eeee09
...@@ -797,7 +797,7 @@ class Op(utils.object2, PureOp, CLinkerOp): ...@@ -797,7 +797,7 @@ class Op(utils.object2, PureOp, CLinkerOp):
""" """
# We add a default get_params() implementation which will try to detect params from the op # We add a default get_params() implementation which will try to detect params from the op
# if params_type is set to a Wrapper. If not, we raise a MethodNodDefined exception. # if params_type is set to a Wrapper. If not, we raise a MethodNotDefined exception.
def get_params(self, node): def get_params(self, node):
if hasattr(self, 'params_type'): if hasattr(self, 'params_type'):
# If params_type is a Wrapper, we try to extract params from the op. # If params_type is a Wrapper, we try to extract params from the op.
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论