]> granicus.if.org Git - python/commit
bpo-21145: Add cached_property decorator in functools (#6982)
authorCarl Meyer <carl@oddbird.net>
Tue, 28 Aug 2018 07:11:56 +0000 (01:11 -0600)
committerNick Coghlan <ncoghlan@gmail.com>
Tue, 28 Aug 2018 07:11:56 +0000 (17:11 +1000)
commitd658deac6060ee92b449a3bf424b460eafd99f3e
treeb20a3a288b17dd17fbd5e555f139b2c1df80bcb7
parent216b745eafa7cd4a683a8405dcfbd7f5567f504c
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.
Doc/library/functools.rst
Lib/functools.py
Lib/test/test_functools.py
Misc/NEWS.d/next/Library/2018-05-18-22-52-34.bpo-21145.AiQMDx.rst [new file with mode: 0644]