Skip to content

Solution#2190

Open
KravAvfv wants to merge 1 commit intomate-academy:masterfrom
KravAvfv:develop
Open

Solution#2190
KravAvfv wants to merge 1 commit intomate-academy:masterfrom
KravAvfv:develop

Conversation

@KravAvfv
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Your solution is approved because it correctly implements the caching decorator: it stores results per unique combination of positional and keyword arguments, prints the required messages for cache hits and misses, and maintains separate caches for each decorated function. The behavior fully matches the task requirements, including handling different numbers of arguments and ensuring that repeated calls with the same arguments return the cached result instead of recomputing. One minor technical issue is in app/main.py where the inner wrapper function (around the def inner(*args, **kwargs) line, roughly line 20) is annotated with -> None even though it returns the wrapped function’s result; consider changing this to a more accurate return type like -> Any to avoid confusion. As an additional improvement, you might want to clarify in a docstring or comment that this decorator assumes all arguments are hashable (immutable) and will raise a TypeError if a mutable, unhashable argument (like a list or dict) is used as part of the cache key. Overall, this is a clean and well-structured implementation that meets the functional requirements—nice work.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants