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