Follow up to the recent changes in Module.

Changeset 1349 removed support for referencing module members by string. This removes keyword arguments from the Method constructor to prevent building Method with keywords, and having the make crash because they are not supported.
上级 00023926
......@@ -326,7 +326,7 @@ class Method(Component):
mode=None
"""This will override the Module compilation mode for this Method"""
def __init__(self, inputs, outputs, updates = {}, mode=None, **kwupdates):
def __init__(self, inputs, outputs, updates = {}, mode=None):
"""Initialize attributes
:param inputs: value for `Method.inputs`
......@@ -334,8 +334,6 @@ class Method(Component):
:param updates: value for `Method.updates`
:param kwupdates: additions to `updates`
:param mode: value for `Method.mode`
:type inputs: list of (str or `Result` or `io.In`)
......@@ -345,15 +343,13 @@ class Method(Component):
:type updates: dict of `Result` or str -> `Result` or str
:type kwupdates: extra updates
:type mode: None or any mode accepted by `compile.function`
"""
super(Method, self).__init__()
self.inputs = inputs
self.outputs = outputs
self.updates = dict(updates, **kwupdates)
self.updates = dict(updates)
self.mode = mode
def resolve_all(self):
......@@ -367,7 +363,7 @@ class Method(Component):
elif isinstance(x, _RComponent):
return x.r
else:
raise Exception('damnit looks like we need this')
raise Exception('Cannot resolve symbol', x)
# return self.resolve(x).r
def resolve_inputs():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论