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

feat: add Form.is_equal_to #2862

Merged
merged 5 commits into from
Dec 1, 2023
Merged

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Dec 1, 2023

We already have Type.is_equal_to and Content.is_equal_to. This PR extends this to Form, and fixes some bugs in the existing implementations.

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

Right, so is_equal_to is a named function because it has a lot of custom arguments for controlling what kind of equality the caller needs. (For instance, "Should parameters count? Which parameters? How about form keys?")

I see that __eq__ is identical to is_equal_to and only defined at the level of the abstract class (Form). That's good.

I see that you've also consolidated some repeated logic in Content._is_equal_to into a helper function.

This all looks good to me! I'll let you decide when to merge it, since you're saying that something is wrong below:

src/awkward/types/recordtype.py Show resolved Hide resolved
@agoose77 agoose77 merged commit b8dcee2 into main Dec 1, 2023
37 checks passed
@agoose77 agoose77 deleted the agoose77/feat-content-is-equal-to branch December 1, 2023 19:16
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.

None yet

2 participants