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 methane
Recipients carljm, methane, mwilbz, serhiy.storchaka, vstinner
Date 2018-10-26.04:55:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1540529703.67.0.788709270274.issue34995@psf.upfronthosting.co.za>
In-reply-to
Content
>  I like the idea of using @functools.cached_property in an abstract class as "documentation". To announce that the property will be cached, even if technically it will not be cached. It's more to use the code as documentation than to execute any code.

When thinking about "code as documentation", we should think not only Python iterpreter, but also IDE, static analystics tools.

If we support abstractmethod + cached_property, it means we encourage to all IDEs & tools to support it.
Otherwise, code completion or static analytics will be broken.

I think "this property is likely (but not must be) cached" hint is not worth enough to add such complexity to all IDEs / static analytics tools.
History
Date User Action Args
2018-10-26 04:55:03methanesetrecipients: + methane, vstinner, carljm, serhiy.storchaka, mwilbz
2018-10-26 04:55:03methanesetmessageid: <1540529703.67.0.788709270274.issue34995@psf.upfronthosting.co.za>
2018-10-26 04:55:03methanelinkissue34995 messages
2018-10-26 04:55:03methanecreate