Skip to content

Commit 7c1bcea

Browse files
committed
Rename the function to _get_dispatch_param
1 parent 113cc29 commit 7c1bcea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/functools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ def _find_impl(cls, registry):
888888
match = t
889889
return registry.get(match)
890890

891-
def _get_positional_param(func, *, pos=0):
891+
def _get_dispatch_param(func, *, pos=0):
892892
"""Finds the first positional user-specified parameter at position *pos*
893893
of a callable or descriptor.
894894
@@ -987,7 +987,7 @@ def register(cls, func=None, _func_is_method=False):
987987
# 0 for functions, 1 for methods where first argument should be skipped
988988
argpos = _func_is_method and not isinstance(func, staticmethod)
989989

990-
argname = _get_positional_param(func, pos=argpos)
990+
argname = _get_dispatch_param(func, pos=argpos)
991991
if argname is None:
992992
raise TypeError(
993993
f"Invalid first argument to `register()`: {func!r} "

0 commit comments

Comments
 (0)