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

When comparing record field handle test for NoneType occurences #3606

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

MangelMaxime
Copy link
Member

Fix #3605

@dbrattli Doing the changes from this PR allows to compare record with optional test against each others when one of the field is None.

However, I don't know if this is the correct approach. I am mostly created this PR to start a discussion on the subject.

I also suspect that something similar will be needed for the __slots__ section.

@dbrattli dbrattli self-requested a review November 22, 2023 08:04
Copy link
Collaborator

@dbrattli dbrattli left a comment

Choose a reason for hiding this comment

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

Looks good. I refactored to match statement and included the slots case as well

@MangelMaxime MangelMaxime merged commit 43f34f9 into main Nov 22, 2023
6 checks passed
@MangelMaxime MangelMaxime deleted the fix/record_equality branch November 22, 2023 13:19
@MangelMaxime
Copy link
Member Author

Thank you, I am merging.

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.

[Python] Equality of record with optional filed doesn't works if the field are set to None
2 participants