New submission from Laurie Opperman <laurie_opper...@hotmail.com>:
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? ---------- components: Library (Lib) messages: 355045 nosy: Epic_Wink priority: normal severity: normal status: open title: Implement setter and deleter on functools.cached_property type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38545> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com