[issue38524] functools.cached_property is not supported for setattr
Nick Coghlan
report at bugs.python.org
Sun Oct 20 09:30:54 EDT 2019
Nick Coghlan <ncoghlan at gmail.com> added the comment:
Regarding the "attrname" property idea: unfortunately, that won't work, as `__set_name__` doesn't just provide the attribute name, it also provides a reference to the class itself.
cached_property needs both pieces of information, not just the attribute name.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38524>
_______________________________________
More information about the Python-bugs-list
mailing list