提交 f7b869ff authored 作者: Matthew Rocklin's avatar Matthew Rocklin

replace set.isdisjoint with any

isdisjoint is python2.6
上级 cd7af1be
...@@ -1030,7 +1030,7 @@ def memodict(f): ...@@ -1030,7 +1030,7 @@ def memodict(f):
@memodict @memodict
def depends((a, b)): def depends((a, b)):
return (not set(a.inputs).isdisjoint(set(b.outputs)) return (any(bout in a.inputs for bout in b.outputs)
or any(depends((ainp.owner, b)) for ainp in a.inputs or any(depends((ainp.owner, b)) for ainp in a.inputs
if ainp.owner)) if ainp.owner))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论