Skip to content

Commit

Permalink
Note functools.cache for the future.
Browse files Browse the repository at this point in the history
On Python 3.9+, the `functools.cache` decorator [^1] has the same effect as
`functools.lru_cache(maxsize=None)`, but is easier to write and has a name that
exposes fewer of its implementation details.

[^1]: https://docs.python.org/3/library/functools.html#functools.cache
  • Loading branch information
sredmond committed Sep 16, 2022
1 parent c2c0413 commit 4ef0c07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion refresh.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import concurrent.futures
import enum
import functools
import functools # MIN_PY=3.9: Replace `functools.lru_cache(maxsize=None)` with `functools.cache`.
import itertools
import json
import locale
Expand Down

0 comments on commit 4ef0c07

Please sign in to comment.