-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call
__eq__
from __ne__
for user defined __eq__
If a user manually defines an `__eq__` for a `Struct` class, the default `__ne__` implementation will now call the user-defined `__eq__` and invert the result, rather than applying the standard `__ne__` logic. This makes it easier for users to manually override `__eq__`, and matches the behavior of standard python classes.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters