Updated at_cache (markdown)
11
at_cache.md
11
at_cache.md
@@ -4,4 +4,15 @@ The @cache decorator can be imported with.
|
|||||||
```python
|
```python
|
||||||
from functools import cache
|
from functools import cache
|
||||||
|
|
||||||
|
@cache
|
||||||
|
def mod25(num):
|
||||||
|
return num%25
|
||||||
|
|
||||||
|
def some_loop_function(iterations=1000):
|
||||||
|
for i in iterations:
|
||||||
|
mod25(i)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
some_loop_function()
|
||||||
|
some_loop_function(1200)
|
||||||
```
|
```
|
Reference in New Issue
Block a user