summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 3f9199f..b492514 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -247,7 +247,7 @@ def isgenerator(object):
def isabstract(object):
"""Return true if the object is an abstract base class (ABC)."""
- return object.__flags__ & TPFLAGS_IS_ABSTRACT
+ return isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT
def getmembers(object, predicate=None):
"""Return all members of an object as (name, value) pairs sorted by name.