Skip to content

Implemented dynamic equality and inequality for PyObject instances #1849

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

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

lostmsu
Copy link
Member

@lostmsu lostmsu commented Jun 30, 2022

Also fixed unhandled Python errors during comparison attempts

What does this implement/fix? Explain your changes.

For == and != operators in C# to use Python equality PyObject must implement operator == and operator !=. C# ignores TryBinaryOperation implementation for equality comparisons.

The "also" part clears Python error when comparison can not be performed.

Does this close any currently open issues?

#1848

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • Updated the CHANGELOG

fixed unhandled Python errors during comparison attempts

fixes pythonnet#1848
@lostmsu lostmsu merged commit 21c5dcc into pythonnet:master Jun 30, 2022
@lostmsu lostmsu deleted the bugs/1848 branch June 30, 2022 23:42
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.

1 participant