aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/util/tf_inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/util/tf_inspect.py')
-rw-r--r--tensorflow/python/util/tf_inspect.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/python/util/tf_inspect.py b/tensorflow/python/util/tf_inspect.py
index 778121e15b..967c872c2a 100644
--- a/tensorflow/python/util/tf_inspect.py
+++ b/tensorflow/python/util/tf_inspect.py
@@ -325,6 +325,11 @@ def isfunction(object): # pylint: disable=redefined-builtin
return _inspect.isfunction(tf_decorator.unwrap(object)[1])
+def isgenerator(object): # pylint: disable=redefined-builtin
+ """TFDecorator-aware replacement for inspect.isgenerator."""
+ return _inspect.isgenerator(tf_decorator.unwrap(object)[1])
+
+
def ismethod(object): # pylint: disable=redefined-builtin
"""TFDecorator-aware replacement for inspect.ismethod."""
return _inspect.ismethod(tf_decorator.unwrap(object)[1])