[Python-checkins] cpython: inspect: Rename private helper function
yury.selivanov
python-checkins at python.org
Wed Jan 29 18:05:53 CET 2014
http://hg.python.org/cpython/rev/07808c511537
changeset: 88814:07808c511537
user: Yury Selivanov <yselivanov at sprymix.com>
date: Wed Jan 29 12:05:40 2014 -0500
summary:
inspect: Rename private helper function
files:
Lib/inspect.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Lib/inspect.py b/Lib/inspect.py
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1505,7 +1505,7 @@
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 @@
# 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 @@
# 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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list