From 18ec28ae11187268852239c6089179ab6635bf2e Mon Sep 17 00:00:00 2001 From: Pieter Eendebak Date: Tue, 1 Aug 2023 17:40:42 +0200 Subject: [PATCH] eliminate method variable --- Lib/functools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/functools.py b/Lib/functools.py index e7c281f1f28322..cce66fd3b97707 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -955,9 +955,9 @@ def __get__(self, obj, cls=None): else: return _method + dp = self.dispatcher.dispatch def _method(*args, **kwargs): - method = self.dispatcher.dispatch(args[0].__class__) - return method.__get__(obj, cls)(*args, **kwargs) + return dp(args[0].__class__).__get__(obj, cls)(*args, **kwargs) _method.__isabstractmethod__ = self.__isabstractmethod__ _method.register = self.register