def __get__(self,obj,type=None):

        if obj is None:
            # Being called on the class, return the original function. This way,
            # introspection works on the class.
            #return func
            print('class access')
            return self.getter

        val = self.getter(obj)
        #print("** auto_attr - loading '%s'" % self.name  # dbg)
        setattr(obj, self.name, val)
        return val
This will be called on attribute access on the class or instance.
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/archive/linalg_decomp_1.py/OneTimeProperty.__get__