def cache_return(func):
 _cache = []
 def wrap():
  if (not _cache):
   _cache.append(func())
  return _cache[0]
 return wrap

def cache_return ( func ) : _cache = [ ] def wrap ( ) : if ( not _cache ) : _cache . append ( func ( ) ) return _cache [ 0 ] return wrap
cache the return value of a function without arguments .