Implemented dynamic equality and inequality for `PyObject` instances by lostmsu · Pull Request #1849 · pythonnet/pythonnet

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