We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6b2636 commit e14b2bcCopy full SHA for e14b2bc
roundup/anypy/findargspec.py
@@ -8,7 +8,7 @@
8
# Python 3+
9
from inspect import getfullargspec as getargspec
10
findargspec = getargspec
11
-except:
+except ImportError:
12
# Python 2.5-2.7 modified from https://bugs.python.org/issue20828
13
import inspect
14
@@ -17,7 +17,7 @@ def findargspec(fn):
17
inspectable = fn
18
elif inspect.isclass(fn):
19
inspectable = fn.__init__
20
- elif hasattr(fn, '__call__'):
+ elif callable(fn):
21
inspectable = fn.__call__
22
else:
23
0 commit comments