We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4f689ba + ae717e0 commit 61e1584Copy full SHA for 61e1584
bpython/inspection.py
@@ -219,7 +219,11 @@ def getargspec(func, f):
219
# Check if it's a real bound method or if it's implicitly calling __init__
220
# (i.e. FooClass(...) and not FooClass.__init__(...) -- the former would
221
# not take 'self', the latter would:
222
- func_name = getattr(f, '__name__', None)
+ try:
223
+ func_name = getattr(f, '__name__', None)
224
+ except:
225
+ # if calling foo.__name__ would result in an error
226
+ func_name = None
227
228
try:
229
is_bound_method = ((inspect.ismethod(f) and f.im_self is not None)
0 commit comments