Skip to content

Commit 0925ede

Browse files
committed
2024 d11, d19: Use @cache instead of @lru_cache()
1 parent 1951f8b commit 0925ede

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

2024/solutions/day11.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env python3
22

33
import sys
4-
from functools import lru_cache
4+
from functools import cache
55
from math import log10
66

77

8-
@lru_cache(None)
8+
@cache
99
def calc(n, blinks=25):
1010
if blinks == 0:
1111
return 1

2024/solutions/day19.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python3
22

33
import sys
4-
from functools import lru_cache, partial
4+
from functools import cache, partial
55

66

7-
@lru_cache(None)
7+
@cache
88
def count(design, op=any):
99
if design == '':
1010
return True

0 commit comments

Comments
 (0)