Scarab  v2.9.0
Project 8 C++ Utility Library
Public Member Functions | Public Attributes | Private Attributes | List of all members
CachedProperty Class Reference
Inheritance diagram for CachedProperty:
Inheritance graph

Public Member Functions

def __init__ (self, wrapped)
 
def __get__ (self, instance, instance_type=None)
 

Public Attributes

 wrapped
 

Private Attributes

 __doc__
 

Detailed Description

Decorator that lazy-loads the value of a property.

The first time the property is accessed, the original property function is
executed. The value it returns is set as the new value of that instance's
property, replacing the original method.

Definition at line 122 of file cindex.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  wrapped 
)

Definition at line 130 of file cindex.py.

Member Function Documentation

◆ __get__()

def __get__ (   self,
  instance,
  instance_type = None 
)

Definition at line 137 of file cindex.py.

Member Data Documentation

◆ __doc__

__doc__
private

Definition at line 133 of file cindex.py.

◆ wrapped

wrapped

Definition at line 131 of file cindex.py.


The documentation for this class was generated from the following file: