Skip to content

Commit

Permalink
add **kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
Your_Name Your_Surname committed Sep 20, 2023
1 parent 6445f39 commit 3e6ef07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 3e6ef07

Please sign in to comment.