FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use __self__ instead of im_self for Python 3 compatibility (fixes #479) · optionalg/bpython@07e18d7 · GitHub

forked from bpython/bpython

Commit 07e18d7

Browse files
committed
Use __self__ instead of im_self for Python 3 compatibility (fixes bpython#479)
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 0748500 commit 07e18d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎bpython/inspection.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def getargspec(func, f):
235235
func_name = None
236236

237237
try:
238-
is_bound_method = ((inspect.ismethod(f) and f.im_self is not None)
238+
is_bound_method = ((inspect.ismethod(f) and f.__self__ is not None)
239239
or (func_name == '__init__' and not
240240
func.endswith('.__init__')))
241241
except:

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL