This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Epic_Wink
Recipients Epic_Wink
Date 2019-10-21.10:31:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571653861.42.0.831485996557.issue38545@roundup.psfhosted.org>
In-reply-to
Content
Support setting/updating and clearing the cached value of a cached-property (getter implemented by bpo-21145). Pretty straight-forward to implement

The question is whether cached-property updating should be:
a) always allowed
b) enabled with a cached-property instance attribute
c) enabled with the decorated method's class attribute
d) enabled with the decorated method's instance attribute
e) enabled in a separate decorator (eg functools.updatable_cached_property)

Note: options a, b, c, and d will make functools.cached_property a data descriptor.

I prefer option b or c, as the decision to make the property updatable becomes the property's definer's.

Also, should a warning be raised if a cached value is being overwritten? Should a warning be raised if no cached value is to be deleted?
History
Date User Action Args
2019-10-21 10:31:01Epic_Winksetrecipients: + Epic_Wink
2019-10-21 10:31:01Epic_Winksetmessageid: <1571653861.42.0.831485996557.issue38545@roundup.psfhosted.org>
2019-10-21 10:31:01Epic_Winklinkissue38545 messages
2019-10-21 10:31:01Epic_Winkcreate