adding all files done so far
This commit is contained in:
13
learning/decorators/test.py
Normal file
13
learning/decorators/test.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import sys
|
||||
import os
|
||||
sys.path.append(os.getcwd()) # noqa E402
|
||||
import decorator
|
||||
import functools
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=4)
|
||||
@decorator.count_calls
|
||||
def fib(num):
|
||||
if num < 2:
|
||||
return num
|
||||
return fib(num - 1) + fib(num - 2)
|
||||
Reference in New Issue
Block a user