def testable_memoized_property(func=None, key_factory=per_instance, **kwargs):
 getter = memoized_method(func=func, key_factory=key_factory, **kwargs)
 def setter(self, val):
  with getter.put(self) as putter:
   putter(val)
 return property(fget=getter, fset=setter, fdel=(lambda self: getter.forget(self)))

def testable_memoized_property ( func = None , key_factory = per_instance , ** kwargs ) : getter = memoized_method ( func = func , key_factory = key_factory , ** kwargs ) def setter ( self , val ) : with getter . put ( self ) as putter : putter ( val ) return property ( fget = getter , fset = setter , fdel = ( lambda self : getter . forget ( self ) ) )
a variant of memoized_property that allows for setting of properties .