diff --git a/README.md b/README.md index 6fb8f02..084082c 100644 --- a/README.md +++ b/README.md @@ -932,7 +932,7 @@ from functools import cache def fib(n): return n if n < 2 else fib(n-2) + fib(n-1) ``` -* **Potential problem with cache is that it can grow indefinitely. To clear stored return values run `'fib.cache_clear()'`, or use `'@lru_cache(maxsize=)'` decorator instead.** +* **Potential problem with cache is that it can grow indefinitely. To clear stored values run `'fib.cache_clear()'`, or use `'@lru_cache(maxsize=)'` decorator instead.** * **CPython interpreter limits recursion depth to 3000 by default. To increase it run `'sys.setrecursionlimit()'`.** ### Parametrized Decorator diff --git a/index.html b/index.html index 4b5fd70..263d07d 100644 --- a/index.html +++ b/index.html @@ -778,7 +778,7 @@ player = Player(point, direction) #
    -
  • Potential problem with cache is that it can grow indefinitely. To clear stored return values run 'fib.cache_clear()', or use '@lru_cache(maxsize=<int>)' decorator instead.
  • +
  • Potential problem with cache is that it can grow indefinitely. To clear stored values run 'fib.cache_clear()', or use '@lru_cache(maxsize=<int>)' decorator instead.
  • CPython interpreter limits recursion depth to 3000 by default. To increase it run 'sys.setrecursionlimit(<int>)'.

Parametrized Decorator

A decorator that accepts arguments and returns a normal decorator that accepts a function.

from functools import wraps