Refs #27753 -- Removed django.utils.functional.curry().
This commit is contained in:
parent
9a750cbd5c
commit
3004d7057f
|
@ -4,15 +4,6 @@ import operator
|
||||||
from functools import total_ordering, wraps
|
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:
|
class cached_property:
|
||||||
"""
|
"""
|
||||||
Decorator that converts a method with a single self argument into a
|
Decorator that converts a method with a single self argument into a
|
||||||
|
|
|
@ -271,6 +271,9 @@ Django 3.0, we're removing these APIs at this time.
|
||||||
* ``django.utils.encoding.python_2_unicode_compatible()`` - Alias of
|
* ``django.utils.encoding.python_2_unicode_compatible()`` - Alias of
|
||||||
``six.python_2_unicode_compatible()``.
|
``six.python_2_unicode_compatible()``.
|
||||||
|
|
||||||
|
* ``django.utils.functional.curry()`` - Use :func:`functools.partial` or
|
||||||
|
:class:`functools.partialmethod`. See :commit:`5b1c389603a353625ae1603`.
|
||||||
|
|
||||||
Miscellaneous
|
Miscellaneous
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue