Skip to content

Commit 07e18d7

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy