aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/autograph/pyct/cfg.py
diff options
context:
space:
mode:
authorGravatar Dan Moldovan <mdan@google.com>2018-10-09 17:59:06 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-09 18:03:16 -0700
commit2db20be49c660a0c475cb57fe0935791d66433ed (patch)
tree4eaf94b9acee144defe5b4e0542a6f89ee849889 /tensorflow/python/autograph/pyct/cfg.py
parenta8cc3cbdeb1563c05d75043c9901135f8b9be65a (diff)
Enable support for lambda functions in static analyses.
The CFG treats lambdas as ordinary expressions. The activity analysis ensures that variables masked by the lambda's arguments are not being tracked. Note: lambdas do not allow direct modification (we exclude indirect mutation via function or methods). PiperOrigin-RevId: 216456682
Diffstat (limited to 'tensorflow/python/autograph/pyct/cfg.py')
-rw-r--r--tensorflow/python/autograph/pyct/cfg.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/tensorflow/python/autograph/pyct/cfg.py b/tensorflow/python/autograph/pyct/cfg.py
index ec733ea38f..fdfcd4dcc1 100644
--- a/tensorflow/python/autograph/pyct/cfg.py
+++ b/tensorflow/python/autograph/pyct/cfg.py
@@ -679,10 +679,6 @@ class AstToCfg(gast.NodeVisitor):
self.cfgs[node] = self.builder.build()
self.builder = self.builder_stack.pop()
- def visit_Lambda(self, node):
- # TODO(mdan): Treat like FunctionDef? That would be a separate CFG.
- raise NotImplementedError()
-
def visit_Return(self, node):
self._process_exit_statement(node, gast.FunctionDef)