Browse Source

Lru

pull/10/head
Jure Šorn 5 years ago
parent
commit
a59ca7fbd4
1 changed files with 2 additions and 0 deletions
  1. 2
      README.md

2
README.md

@ -624,6 +624,8 @@ def add(x, y):
### LRU Cache ### LRU Cache
**Decorator that caches function's return values. All arguments must be hashable.** **Decorator that caches function's return values. All arguments must be hashable.**
```python ```python
from functools import lru_cache
@lru_cache(maxsize=None) @lru_cache(maxsize=None)
def fib(n): def fib(n):
if n < 2: if n < 2:

Loading…
Cancel
Save