提交 7f090ddd authored 作者: David Warde-Farley's avatar David Warde-Farley

Remove comment, add another, PEP8.

上级 15d1913f
......@@ -82,20 +82,20 @@ class Env(utils.object2):
def __init__(self, inputs, outputs, features=None):
"""
Create an Env which operates on the subgraph bound by the inputs and outputs
sets.
Create an Env which operates on the subgraph bound by the inputs and
outputs sets.
This class keeps a pointer to the inputs and outputs, and also modifies them.
This class keeps a pointer to the inputs and outputs, and also modifies
them.
#TODO: document what variables are[not] set in the env when a feature is added via the
constructor. How constructed is the env?
#TODO: document what variables are[not] set in the env when a feature
is added via the constructor. How constructed is the env?
"""
if features is None:
features = []
# XXX: What the hell? Was the features argument never used?
self._features = []
# All nodes in the subgraph defined by inputs and outputs are cached in nodes
......@@ -113,8 +113,10 @@ class Env(utils.object2):
for input in self.inputs:
if input.owner is not None:
raise ValueError("One of the provided inputs is the output of an already existing node. " \
"If that is okay, either discard that input's owner or use graph.clone.")
raise ValueError("One of the provided inputs is the output of"
"an already existing node. "
"If that is okay, either discard that "
"input's owner or use graph.clone.")
self.__setup_r__(input)
self.variables.add(input)
......@@ -436,6 +438,9 @@ class Env(utils.object2):
### features ###
# XXX: This is terribly named. The "extend" method of a list
# takes a sequence, and since this is a kind of container you
# would expect it to do similarly.
def extend(self, feature):
"""WRITEME
Adds a feature to this env. The feature may define one
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论