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

Develop #2216

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Develop #2216

wants to merge 3 commits into from

Conversation

noralltach
Copy link

No description provided.

Oleksandr Okseniuk and others added 3 commits June 6, 2024 14:01
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 task requirements! 🎉 Your solution effectively categorizes variables into mutable and immutable types using the isinstance function. Although there's a minor logical error with the use of isinstance and tuples, it doesn't significantly impact the core functionality of your code. For future improvements, consider using any(isinstance(i, t) for t in mutable_types) to ensure accurate type checking. Keep up the good work! 😊

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

my_favourite_films, profile_info, marks, collection_of_coins]

for i in variables:
if isinstance(i, mutable_types):

Choose a reason for hiding this comment

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

The isinstance function does not work as expected with a tuple of types. It will not correctly identify if an object is an instance of any type in the tuple. You should use any(isinstance(i, t) for t in mutable_types) to check if i is an instance of any type in mutable_types.

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