aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/functools.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/functools.py')
-rw-r--r--Lib/functools.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/functools.py b/Lib/functools.py
index 39a4af81d05..ab7d71e126b 100644
--- a/Lib/functools.py
+++ b/Lib/functools.py
@@ -423,6 +423,12 @@ class partialmethod(object):
def __isabstractmethod__(self):
return getattr(self.func, "__isabstractmethod__", False)
+# Helper functions
+
+def _unwrap_partial(func):
+ while isinstance(func, partial):
+ func = func.func
+ return func
################################################################################
### LRU Cache function decorator