Skip to content

Commit 1017431

Browse files
committed
Insert an extra argument "obj" into argspec for method descriptors.
1 parent c62eee2 commit 1017431

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bpython/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ def getargspec(func):
515515
if t is None:
516516
return None
517517
self.argspec = t
518+
if inspect.ismethoddescriptor(f):
519+
self.argspec[1][0].insert(0, 'obj')
518520
self.argspec.append(is_bound_method)
519521
return True
520522
except AttributeError:

0 commit comments

Comments
 (0)