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 ncoghlan
Recipients carljm, docs@python, hongweipeng, ncoghlan, serhiy.storchaka, steven.daprano
Date 2019-10-20.13:30:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571578254.16.0.165648614697.issue38524@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-10-20 13:30:54ncoghlansetrecipients: + ncoghlan, carljm, steven.daprano, docs@python, serhiy.storchaka, hongweipeng
2019-10-20 13:30:54ncoghlansetmessageid: <1571578254.16.0.165648614697.issue38524@roundup.psfhosted.org>
2019-10-20 13:30:54ncoghlanlinkissue38524 messages
2019-10-20 13:30:54ncoghlancreate