[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__
INADA Naoki
report at bugs.python.org
Sat Oct 20 09:38:08 EDT 2018
INADA Naoki <songofacandy at gmail.com> added the comment:
I agree with Serhiy.
For static hinting, `@property` should be enough.
I think tools like mypy should support this pattern:
class MyABC(metaclass=ABCMeta):
@property
@abstractmethod
def myprop(self):
...
class MyConcrete(MyABC):
@cached_property
def myprop(self):
return self._some_heavy_work()
----------
nosy: +inada.naoki
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34995>
_______________________________________
More information about the Python-bugs-list
mailing list