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

Remove comment, add another, PEP8.

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