New submission from Bernat Gabor <gaborjber...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue41523>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to