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 mwilbz
Recipients mwilbz, serhiy.storchaka
Date 2018-10-17.15:50:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539791439.09.0.788709270274.issue34995@psf.upfronthosting.co.za>
In-reply-to
Content
I agree, a comment can serve the same purpose. But for the same reasons it's useful to express typing hints in Python with real syntax, and the reasons it's useful to have the abc module in the first place, I think it is useful to be able to annotate an abstract method with @cachedproperty.

The purpose of this change is not to add code developers would try to use at runtime, it is to allow developers to communicate their intentions to static code analysis tools and to other developers, using standard decorators from builtins that do not break one another. Indeed, abstract methods should not be executed (on purpose), but Python still supports abstract methods to protect developers who want to explicitly label their code as "do not execute".

Therefore, please do not think of this change as something someone would try to execute. It is for hinting functionality, and it is to protect developers who would decorate a method with @cached_property and @abstractmethod and find that abc's functionality was unexpectedly broken.
History
Date User Action Args
2018-10-17 15:50:39mwilbzsetrecipients: + mwilbz, serhiy.storchaka
2018-10-17 15:50:39mwilbzsetmessageid: <1539791439.09.0.788709270274.issue34995@psf.upfronthosting.co.za>
2018-10-17 15:50:39mwilbzlinkissue34995 messages
2018-10-17 15:50:39mwilbzcreate