1 2 3 4 5 6 7 8
# for py32 or above from functools import lru_cache @lru_cache(maxsize=None) def slow_function(message, timeout): """This function is slow.""" print(message)