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

Returning False in __eq__ if other type differs #26

Merged
merged 1 commit into from
May 11, 2021
Merged

Returning False in __eq__ if other type differs #26

merged 1 commit into from
May 11, 2021

Conversation

ravirahman
Copy link
Contributor

In __eq__(self, other) for Bn, EcGroup, and EcPt,
the comparison raised an exception if other is not
the proper type. Added short-circuiting logic to
return False (instead of crashing) if the other type
is incorrect. Updated test cases.

In `__eq__(self, other)` for `Bn`, `EcGroup`, and `EcPoint`,
the comparison raised an exception if `other` is not
the proper type. Added short-circuiting logic to
return False (instead of crashing) if the other type
is incorrect. Updated test cases.
@gdanezis
Copy link
Owner

Nice one!

@gdanezis gdanezis merged commit 7aafddb into gdanezis:master May 11, 2021
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