[New-bugs-announce] [issue41523] functools.cached_property does not satisfy the property check

Bernat Gabor report at bugs.python.org
Tue Aug 11 13:23:57 EDT 2020


New submission from Bernat Gabor <gaborjbernat at gmail.com>:

from functools import cached_property, lru_cache

class A:
    @property
    def a(self): return ''

    @cached_property
    def b(self): return ''
    
    @property
    @lru_cache
    def c(self):
        return ""


print(isinstance(A.a, property))
print(isinstance(A.b, property))
print(isinstance(A.c, property))

True
False
True

I feel like cached property should be of type property, not?

----------
messages: 375188
nosy: Bernat Gabor
priority: normal
severity: normal
status: open
title: functools.cached_property does not satisfy the property check
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41523>
_______________________________________


More information about the New-bugs-announce mailing list