Skip to content

Commit 7ac8275

Browse files
Cast the idx to an integer explicitly
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent 0859bc0 commit 7ac8275

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/functools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ def _get_singledispatch_annotated_param(func, *, _inside_dispatchmethod=False):
906906
# Pick the first parameter if registering via singledispatch.
907907
# Pick the second parameter if registering via singledispatchmethod.
908908
else:
909-
idx = _inside_dispatchmethod
909+
idx = int(_inside_dispatchmethod)
910910

911911
# If it is a simple function, try to read from the code object fast.
912912
if isinstance(func, FunctionType) and not hasattr(func, "__wrapped__"):

0 commit comments

Comments
 (0)