Message328510
> 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. |
|
Date |
User |
Action |
Args |
2018-10-26 04:55:03 | methane | set | recipients:
+ methane, vstinner, carljm, serhiy.storchaka, mwilbz |
2018-10-26 04:55:03 | methane | set | messageid: <1540529703.67.0.788709270274.issue34995@psf.upfronthosting.co.za> |
2018-10-26 04:55:03 | methane | link | issue34995 messages |
2018-10-26 04:55:03 | methane | create | |
|