diff options
| author | Deep Sukhwani <deepsukhwani@gmail.com> | 2020-03-28 18:52:54 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-03-31 10:46:48 +0200 |
| commit | 4b146e0c83891fc67a422aa22f846bb7654c4d38 (patch) | |
| tree | 379ab2bc958f952c95e22a139359dbc21faafc1e /docs/ref/utils.txt | |
| parent | 93ed71e05802a47774b52503cdc3442686d686c1 (diff) | |
Fixed #30864 -- Doc'd classproperty decorator.
Diffstat (limited to 'docs/ref/utils.txt')
| -rw-r--r-- | docs/ref/utils.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 0375b2e63b..a9f4107d8c 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -556,6 +556,14 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004 z = person.friends # does not call x is z # is True +.. class:: classproperty(method=None) + + .. versionadded:: 3.1 + + Similar to :py:func:`@classmethod <classmethod>`, the ``@classproperty`` + decorator converts the result of a method with a single ``cls`` argument + into a property that can be accessed directly from the class. + .. function:: keep_lazy(func, *resultclasses) Django offers many utility functions (particularly in ``django.utils``) |
