mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 21:10:06 +01:00
Merge pull request #867 from RobinD42/fix-issue855
im_func --> __func__
(cherry picked from commit 6b858b5966)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user