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

ready #1356

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

ready #1356

wants to merge 1 commit into from

Conversation

n-roud
Copy link

@n-roud n-roud commented Oct 21, 2024

with args cache

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 the implementation! 🎉 While there are a couple of minor typos and an opportunity to optimize the loop for efficiency, these don't critically impact the functionality. Keep up the good work and consider these improvements for future projects!

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

# Write your code here
pass
cache_args = {}
resalt_func = {}

Choose a reason for hiding this comment

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

There is a typo in the variable name resalt_func. It should be result_func to be more descriptive and correct.


if args not in cache_args:
cache_args[i[0]] = args
resalt = func(*args)

Choose a reason for hiding this comment

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

There is a typo in the variable name resalt. It should be result to be more descriptive and correct.

Comment on lines +21 to +24
for key, value in cache_args.items():
if value == args:
args_key = key
return resalt_func[args_key]

Choose a reason for hiding this comment

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

The loop to find args_key is inefficient. Consider storing the result directly in the cache with args as the key instead of using an index. This will simplify the retrieval process and improve efficiency.

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.

3 participants