Package mapproxy :: Package core :: Module utils :: Class cached_property
[hide private]
[frames] | no frames]

Class cached_property

source code

object --+
         |
        cached_property

A decorator that converts a function into a lazy property. The function wrapped is called the first time to retrieve the result and than that calculated result is used the next time you access the value:

class Foo(object):

    @cached_property
    def foo(self):
        # calculate something important here
        return 42
Instance Methods [hide private]
 
__init__(self, func, name=None, doc=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__get__(self, obj, type=None) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, func, name=None, doc=None)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)