hongweipeng <hongweichen8...@sina.com> added the comment:

Is it possible to add an attrname parameter? It is more convenient to use.

class cached_property:
    def __init__(self, func, attrname=None):
        self.attrname = attrname
        ...

cls.age3 = cached_property(age, 'age3')

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38524>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to