def cachable(func):
    '''
    Cache results of function in func.cache.
    -- No keyword args allowed.
    '''
    func.cache = {}
    def out(*args):
        if args not in func.cache:
            func.cache[args] = func(*args)
        return func.cache[args]
    return out

    Cache results of function in func.cache.
    -- No keyword args allowed.
    
recipes/Python/576365_Simple_Cached_Functions/recipe-576365.py