summaryrefslogtreecommitdiff
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-10-15 03:06:55 +0000
committerBenjamin Peterson <benjamin@python.org>2009-10-15 03:06:55 +0000
commitc63457b18e986ae74a13e5b6601bdbd58e909c84 (patch)
tree906f6ead74945d99c97f1082b231908b2ecb8600 /Lib/inspect.py
parentca2d2529cee492ea0ac2b88ba0fdeb75fff0781a (diff)
downloadcpython-git-c63457b18e986ae74a13e5b6601bdbd58e909c84.tar.gz
make inspect.isabstract() always return a boolean; add a test for it, too #7069
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index ac3434d43a..e5098d798e 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -242,7 +242,7 @@ def isroutine(object):
def isabstract(object):
"""Return true if the object is an abstract base class (ABC)."""
- return isinstance(object, type) and object.__flags__ & TPFLAGS_IS_ABSTRACT
+ return bool(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.