Message355045
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? |
|
Date |
User |
Action |
Args |
2019-10-21 10:31:01 | Epic_Wink | set | recipients:
+ Epic_Wink |
2019-10-21 10:31:01 | Epic_Wink | set | messageid: <1571653861.42.0.831485996557.issue38545@roundup.psfhosted.org> |
2019-10-21 10:31:01 | Epic_Wink | link | issue38545 messages |
2019-10-21 10:31:01 | Epic_Wink | create | |
|