From 3e6ef0755383e79f01b73c678bee2682a62f6756 Mon Sep 17 00:00:00 2001 From: Your_Name Your_Surname Date: Wed, 20 Sep 2023 16:36:45 +0300 Subject: [PATCH] add **kwargs --- app/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 52cfd21b..85901b03 100644 --- a/app/main.py +++ b/app/main.py @@ -6,9 +6,9 @@ def cache(func: Callable) -> Callable: result: dict = {} @wraps(func) - def inner(*args) -> int: + def inner(*args, **kwargs) -> int: if args not in result.keys(): - result[args] = func(*args) + result[args] = func(*args, **kwargs) print("Calculating new result") else: print("Getting from cache")