Skip to content

Commit 682c41e

Browse files
committed
Add bound methods to slow path
1 parent eadc38f commit 682c41e

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
@@ -896,7 +896,7 @@ def _get_dispatch_param(func, *, pos=0):
896896
*pos* should either be 0 (for functions and staticmethods) or 1 (for methods).
897897
"""
898898
# Fast path for typical callables and descriptors.
899-
if isinstance(func, (MethodType, classmethod, staticmethod)):
899+
if isinstance(func, (classmethod, staticmethod)):
900900
func = func.__func__
901901
if isinstance(func, FunctionType) and not hasattr(func, "__wrapped__"):
902902
func_code = func.__code__

0 commit comments

Comments
 (0)