Yes, it's a possibility to do that. The issue at hand is probably, that Python objects do not derive from System.Object and can thus not match the overload. Can you prepare a PR?
@filmor I am not sure I understood your comment. You can see my fix in the commit e9712b4 above. This change is potentially backwards-incompatible in case there's a .NET method with two overloads, one having parameter type object, and another PyObject for some parameter.
Activity
added a regression test for pythonnet#881
when converting to object, wrap values of unknown type into PyObject …
provide detailed error message, when an overload can't be found when …
filmor commented on Mar 6, 2019
Yes, it's a possibility to do that. The issue at hand is probably, that Python objects do not derive from System.Object and can thus not match the overload. Can you prepare a PR?
lostmsu commented on Apr 14, 2019
@filmor I am not sure I understood your comment. You can see my fix in the commit e9712b4 above. This change is potentially backwards-incompatible in case there's a .NET method with two overloads, one having parameter type object, and another PyObject for some parameter.
filmor commented on Apr 23, 2019
I'll need to look into this, could you make a PR from this commit?
added a regression test for pythonnet#881
when converting to object, wrap values of unknown type into PyObject …
provide detailed error message, when an overload can't be found when …
Improve "No method matches given arguments" message with more details (…
added a regression test for pythonnet#881
when converting to object, wrap values of unknown type into PyObject …
added a regression test for pythonnet#881
when converting to object, wrap values of unknown type into PyObject …
Enable C# parameters of type `object` accept any argument, passed fro…
Improve "No constructor matches given arguments" message with more de…
Improve "No constructor matches given arguments" message with more de…
Enable C# parameters of type `object` accept any argument, passed fro…
Improve "No method matches given arguments" message with more details (…
Enable C# parameters of type `object` accept any argument, passed fro…
Improve "No constructor matches given arguments" message with more de…
Enable C# parameters of type `object` accept any argument, passed fro…