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.
1 parent b7fd433 commit e176068Copy full SHA for e176068
bpython/inspection.py
@@ -212,8 +212,10 @@ def getargspec(func, f):
212
# Check if it's a real bound method or if it's implicitly calling __init__
213
# (i.e. FooClass(...) and not FooClass.__init__(...) -- the former would
214
# not take 'self', the latter would:
215
+ func_name = getattr(f, '__name__', None)
216
+
217
is_bound_method = ((inspect.ismethod(f) and f.im_self is not None)
- or (f.__name__ == '__init__' and not
218
+ or (func_name == '__init__' and not
219
func.endswith('.__init__')))
220
try:
221
if py3:
0 commit comments