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

line splitting in Env

上级 96ce70fa
...@@ -298,14 +298,19 @@ class Env(utils.object2): ...@@ -298,14 +298,19 @@ class Env(utils.object2):
if node == 'output': if node == 'output':
r = self.outputs[i] r = self.outputs[i]
if not r.type == new_r.type: if not r.type == new_r.type:
raise TypeError("The type of the replacement must be the same as the type of the original Variable.", r, new_r) raise TypeError("The type of the replacement must be the"
" same as the type of the original Variable.",
r, new_r)
self.outputs[i] = new_r self.outputs[i] = new_r
else: else:
if node.env is not self: if node.env is not self:
raise Exception("Cannot operate on %s because it does not belong to this Env" % node) raise Exception("Cannot operate on %s because it does not"
" belong to this Env" % node)
r = node.inputs[i] r = node.inputs[i]
if not r.type == new_r.type: if not r.type == new_r.type:
raise TypeError("The type of the replacement must be the same as the type of the original Variable.", r, new_r) raise TypeError("The type of the replacement must be the"
" same as the type of the original Variable.",
r, new_r)
node.inputs[i] = new_r node.inputs[i] = new_r
self.__import_r__([new_r]) self.__import_r__([new_r])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论