Skip to content

Commit 30994eb

Browse files
committed
Fiat lux
1 parent 052c2fd commit 30994eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Lib/functools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -898,17 +898,17 @@ def _get_dispatch_param(func, *, _inside_dispatchmethod=False):
898898
if isinstance(func, staticmethod):
899899
idx = 0
900900
func = func.__func__
901-
# Pick the second parameter if function had @classmethod or is any bound method.
901+
# Pick the second parameter if function had @classmethod or is a bound method.
902902
elif isinstance(func, (classmethod, MethodType)):
903903
idx = 1
904904
func = func.__func__
905-
# If it is likely a regular function:
906-
# Pick the first parameter if calling from singledispatch().
907-
# Pick the second parameter if calling from singledispatchmethod.
905+
# If it is a regular function:
906+
# Pick the first parameter if registering from singledispatch.
907+
# Pick the second parameter if registering from singledispatchmethod.
908908
else:
909909
idx = _inside_dispatchmethod
910910

911-
# If it is a simple function, try to fast read from the code object.
911+
# If it is a simple function, try to read from the code object fast.
912912
if isinstance(func, FunctionType) and not hasattr(func, "__wrapped__"):
913913
# Emulate inspect._signature_from_function to get the desired parameter.
914914
func_code = func.__code__

0 commit comments

Comments
 (0)