simplfy code
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 230df2b..1685bfc 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -158,10 +158,8 @@
     Generator function objects provides same attributes as functions.
 
     See isfunction.__doc__ for attributes listing."""
-    if (isfunction(object) or ismethod(object)) and \
-        object.func_code.co_flags & CO_GENERATOR:
-        return True
-    return False
+    return bool((isfunction(object) or ismethod(object)) and
+                object.func_code.co_flags & CO_GENERATOR)
 
 def isgenerator(object):
     """Return true if the object is a generator.