From 0c75ee6277eb93f98f2ab34836bcedc9854da449 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 30 May 2018 21:02:57 -0700 Subject: [PATCH] Merge pull request #867 from RobinD42/fix-issue855 im_func --> __func__ (cherry picked from commit 6b858b5966c6ca1084b60b0059bb14b9f413760d) --- wx/py/introspect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wx/py/introspect.py b/wx/py/introspect.py index 507400d4..d5548cd9 100644 --- a/wx/py/introspect.py +++ b/wx/py/introspect.py @@ -371,7 +371,7 @@ def getBaseObject(obj): elif callable(obj): # Get the __call__ method instead. try: - obj = obj.__call__.im_func + obj = obj.__call__.__func__ dropSelf = 1 except AttributeError: dropSelf = 0 @@ -382,7 +382,7 @@ def getBaseObject(obj): def getConstructor(obj): """Return constructor for class object, or None if there isn't one.""" try: - return obj.__init__.im_func + return obj.__init__.__func__ except AttributeError: for base in obj.__bases__: constructor = getConstructor(base)