Skip to content

Commit e3538f5

Browse files
committed
More meaningful variable names
1 parent 4c1cfd7 commit e3538f5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lib/functools.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ def __init__(self, unbound, obj, cls):
10631063

10641064
# Dispatch on the second argument if a generic method turns into
10651065
# a bound method on instance-level access. See GH-143535.
1066-
self._skip_bound_arg = obj is None and isinstance(func, FunctionType)
1066+
self._skip_first_arg = obj is None and isinstance(func, FunctionType)
10671067

10681068
try:
10691069
self.__module__ = func.__module__
@@ -1093,22 +1093,22 @@ def __call__(self, /, *args, **kwargs):
10931093
'singledispatchmethod method')
10941094
raise TypeError(f'{funcname} requires at least '
10951095
'1 positional argument')
1096-
index = 1 if self._skip_bound_arg else 0
1096+
index = 1 if self._skip_first_arg else 0
10971097
method = self._dispatch(args[index].__class__)
10981098

10991099
if hasattr(method, "__get__"):
11001100
# If the method is a descriptor, it might be necessary
11011101
# to drop the first argument before calling
11021102
# as it can be no longer expected after descriptor access.
1103-
skip_first_arg = False
1103+
skip_bound_arg = False
11041104
if isinstance(method, staticmethod):
1105-
skip_first_arg = self._skip_bound_arg
1105+
skip_bound_arg = self._skip_first_arg
11061106

11071107
method = method.__get__(self._obj, self._cls)
11081108
if isinstance(method, MethodType):
1109-
skip_first_arg = self._skip_bound_arg
1109+
skip_bound_arg = self._skip_first_arg
11101110

1111-
if skip_first_arg:
1111+
if skip_bound_arg:
11121112
return method(*args[1:], **kwargs)
11131113
return method(*args, **kwargs)
11141114

0 commit comments

Comments
 (0)