1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Refs #27753 -- Removed django.utils.functional.curry().

This commit is contained in:
Tim Graham
2019-02-04 20:22:44 -05:00
parent 9a750cbd5c
commit 3004d7057f
2 changed files with 3 additions and 9 deletions

View File

@@ -4,15 +4,6 @@ import operator
from functools import total_ordering, wraps
# You can't trivially replace this with `functools.partial` because this binds
# to classes and returns bound instances, whereas functools.partial (on
# CPython) is a type and its instances don't bind.
def curry(_curried_func, *args, **kwargs):
def _curried(*moreargs, **morekwargs):
return _curried_func(*args, *moreargs, **{**kwargs, **morekwargs})
return _curried
class cached_property:
"""
Decorator that converts a method with a single self argument into a