def memoize_property(storage):
 def decorator(method):
  name = method.__name__
  def wrapper(self):
   if (name not in storage):
    storage[name] = method(self)
   return storage[name]
  return property(update_wrapper(wrapper, method))
 return decorator

def memoize_property ( storage ) : def decorator ( method ) : name = method . __name__ def wrapper ( self ) : if ( name not in storage ) : storage [ name ] = method ( self ) return storage [ name ] return property ( update_wrapper ( wrapper , method ) ) return decorator
create a property .