diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-10-15 03:06:55 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-10-15 03:06:55 +0000 |
commit | c63457b18e986ae74a13e5b6601bdbd58e909c84 (patch) | |
tree | 906f6ead74945d99c97f1082b231908b2ecb8600 /Lib/inspect.py | |
parent | ca2d2529cee492ea0ac2b88ba0fdeb75fff0781a (diff) | |
download | cpython-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.py | 2 |
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. |