summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2018-08-28 07:11:56 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2018-08-28 07:11:56 (GMT)
commitd658deac6060ee92b449a3bf424b460eafd99f3e (patch)
treeb20a3a288b17dd17fbd5e555f139b2c1df80bcb7 /Misc
parent216b745eafa7cd4a683a8405dcfbd7f5567f504c (diff)
downloadcpython-d658deac6060ee92b449a3bf424b460eafd99f3e.zip
cpython-d658deac6060ee92b449a3bf424b460eafd99f3e.tar.gz
cpython-d658deac6060ee92b449a3bf424b460eafd99f3e.tar.bz2
bpo-21145: Add cached_property decorator in functools (#6982)
Robust caching of calculated properties is harder than it looks at first glance, so add a solid, well-tested implementation to the standard library.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-05-18-22-52-34.bpo-21145.AiQMDx.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-05-18-22-52-34.bpo-21145.AiQMDx.rst b/Misc/NEWS.d/next/Library/2018-05-18-22-52-34.bpo-21145.AiQMDx.rst
new file mode 100644
index 0000000..a5973c3
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-05-18-22-52-34.bpo-21145.AiQMDx.rst
@@ -0,0 +1,2 @@
+Add ``functools.cached_property`` decorator, for computed properties cached
+for the life of the instance.