次のコード スニペットがどのように機能するかについて混乱していますか? これはデコレーターであり、プロパティを遅延して初期化し、次のリクエストでキャッシュされたプロパティを使用します。コードを見ると、常に self.method を呼び出すように見えますか? 少しの説明が役に立ちます
class cached_property(object):
    def __init__(self, method, name=None):
        self.method = method
        self.name = name or method.__name__
        self.__doc__ = method.__doc__
    def __get__(self, inst, cls):
        if inst is None:
            return self
        result = self.method(inst)
        setattr(inst, self.name, result)
        return result