Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #1364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Solution #1364

wants to merge 1 commit into from

Conversation

FanniMalevych
Copy link

No description provided.

Copy link

@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.

Great job on implementing the caching decorator! 🎉 The code meets all the task requirements and handles multiple functions effectively. While the current cache key generation might cause issues with unhashable types, this is a minor concern that doesn't affect the core functionality. Consider exploring more robust methods for generating cache keys in future projects. Keep up the good work! 🚀

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

cached_results = {}

def wrapper(*args) -> Any:
key = args

Choose a reason for hiding this comment

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

The current cache key is set to args, which is a tuple of arguments. This can cause issues if any of the arguments are unhashable types (e.g., lists, dictionaries). Consider using a more robust method for generating cache keys, such as converting arguments to a hashable form or using a serialization method.

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