Updated at_cache (markdown)
@@ -5,10 +5,14 @@ The @cache decorator can be import with.
|
|||||||
from functools import cache
|
from functools import cache
|
||||||
|
|
||||||
@cache
|
@cache
|
||||||
def some_loop_function():
|
def some_loop_function(iterations = 1000):
|
||||||
mod25 = []
|
mod25 = []
|
||||||
for i in range(1000):
|
for i in range(iterations):
|
||||||
if i%25:
|
if i%25:
|
||||||
mod25.append(i)
|
mod25.append(i)
|
||||||
return mod25
|
return mod25
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
some_loop_function()
|
||||||
|
some_loop_function(1200)
|
||||||
```
|
```
|
Reference in New Issue
Block a user