summaryrefslogtreecommitdiff
path: root/django/utils/functional.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2017-05-15 09:25:14 -0400
committerTim Graham <timograham@gmail.com>2017-05-15 09:25:14 -0400
commitf0d47ab3b6aef90480460fc3c96453d1bb47532a (patch)
tree12f60ba277388b4b4aa81ea25d518e61afd5eab4 /django/utils/functional.py
parentf9bae845eabd975a07e24d94e399299c1601acb7 (diff)
Corrected cached_property.__get__() docstring.
Diffstat (limited to 'django/utils/functional.py')
-rw-r--r--django/utils/functional.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py
index 93c1cc1984..a1ab642e2d 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -27,8 +27,9 @@ class cached_property:
def __get__(self, instance, cls=None):
"""
- Call the function and replace this cached_property instance with the
- return value so that the function and this method aren't called again.
+ Call the function and put the return value in instance.__dict__ so that
+ subsequent attribute access on the instance returns the cached value
+ instead of calling cached_property.__get__().
"""
if instance is None:
return self