提交 b9b9389a authored 作者: Frederic Bastien's avatar Frederic Bastien

added a default_initialize method that is missing when we use the…

added a default_initialize method that is missing when we use the _instance_initialize method in a module.
上级 75888e54
......@@ -664,6 +664,10 @@ class ComponentList(Composite):
return self.__class__(*[c.dup() for c in self._components])
def default_initialize(self, init = {}, **kwinit):
for k, initv in dict(init, **kwinit).iteritems():
self[k] = initv
class ComponentDictInstance(CompositeInstance):
"""
ComponentDictInstance is meant to be instantiated by ComponentDict.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论