<s> from functools import wraps <EOL> class lazy_property ( property ) : <EOL> """<STR_LIT>""" <EOL> def __new__ ( cls , fget = None , fset = None , fdel = None , doc = None ) : <EOL> if fget is not None : <EOL> @ wraps ( fget ) <EOL> def fget ( instance , instance_type = None , name = fget . __name__ ) : <EOL> return getattr ( instance , name ) ( ) <EOL> if fset is not None : <EOL> @ wraps ( fset ) <EOL> def fset ( instance , value , name = fset . __name__ ) : <EOL> return getattr ( instance , name ) ( value ) <EOL> if fdel is not None : <EOL> @ wraps ( fdel ) <EOL> def fdel ( instance , name = fdel . __name__ ) : <EOL> return getattr ( instance , name ) ( ) <EOL> return property ( fget , fset , fdel , doc ) </s>
