summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-01-29 17:05:40 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2014-01-29 17:05:40 (GMT)
commit421f0c7be1286e617eb6c00e98a512ce3993d222 (patch)
tree7e37452496941e5332aeffb6da994923ee009603 /Lib/inspect.py
parent4cb939174c3fd45b5087ef5d2ca5c32a112b18d5 (diff)
downloadcpython-421f0c7be1286e617eb6c00e98a512ce3993d222.zip
cpython-421f0c7be1286e617eb6c00e98a512ce3993d222.tar.gz
cpython-421f0c7be1286e617eb6c00e98a512ce3993d222.tar.bz2
inspect: Rename private helper function
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 4f9c1d1..e83a222 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1505,7 +1505,7 @@ _NonUserDefinedCallables = (_WrapperDescriptor,
types.BuiltinFunctionType)
-def _get_user_defined_method(cls, method_name):
+def _signature_get_user_defined_method(cls, method_name):
try:
meth = getattr(cls, method_name)
except AttributeError:
@@ -1682,17 +1682,17 @@ def signature(obj):
# First, let's see if it has an overloaded __call__ defined
# in its metaclass
- call = _get_user_defined_method(type(obj), '__call__')
+ call = _signature_get_user_defined_method(type(obj), '__call__')
if call is not None:
sig = signature(call)
else:
# Now we check if the 'obj' class has a '__new__' method
- new = _get_user_defined_method(obj, '__new__')
+ new = _signature_get_user_defined_method(obj, '__new__')
if new is not None:
sig = signature(new)
else:
# Finally, we should have at least __init__ implemented
- init = _get_user_defined_method(obj, '__init__')
+ init = _signature_get_user_defined_method(obj, '__init__')
if init is not None:
sig = signature(init)
@@ -1711,7 +1711,7 @@ def signature(obj):
# We also check that the 'obj' is not an instance of
# _WrapperDescriptor or _MethodWrapper to avoid
# infinite recursion (and even potential segfault)
- call = _get_user_defined_method(type(obj), '__call__')
+ call = _signature_get_user_defined_method(type(obj), '__call__')
if call is not None:
sig = signature(call)