Your IP : 216.73.216.196


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/lazy_object_proxy/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/lazy_object_proxy/utils.py

def identity(obj):
    return obj


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

    def __get__(self, obj, cls):
        if obj is None:
            return self
        value = obj.__dict__[self.func.__name__] = self.func(obj)
        return value