提交 f8d20065 authored 作者: James Bergstra's avatar James Bergstra

overrided Component.__call__ to provide more helpful error

上级 d3fc88fe
...@@ -256,6 +256,10 @@ class Method(Component): ...@@ -256,6 +256,10 @@ class Method(Component):
dict(self.updates), dict(self.updates),
list(self.kits)) list(self.kits))
def __call__(self, *args, **kwargs):
raise TypeError("'Method' object is not callable"
" (Hint: compile your module first. See Component.make())")
class CompositeInstance(object): class CompositeInstance(object):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论