There was an error while loading. Please reload this page.
1 parent ad72895 commit c3c2ec5Copy full SHA for c3c2ec5
docs/ref/utils.txt
@@ -473,6 +473,10 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
473
# set a value manually, that will persist on the instance until cleared
474
person.friends = ["Huckleberry Finn", "Tom Sawyer"]
475
476
+ Because of the way the `descriptor protocol
477
+ <descriptor-invocation>`_ works, using ``del`` (or ``delattr``) on a
478
+ ``cached_property`` that hasn't been accessed raises ``AttributeError``.
479
+
480
As well as offering potential performance advantages, ``@cached_property``
481
can ensure that an attribute's value does not change unexpectedly over the
482
life of an instance. This could occur with a method whose computation is
0 commit comments