QuantConnect / pythonnet

Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers.
http://pythonnet.github.io
MIT License
28 stars 27 forks source link

MethodBinder PyObject + CLRObject resolution #62

Open Martin-Molinero opened 2 years ago

Martin-Molinero commented 2 years ago

Ideally pythonNet method binder could detect if a PyObject is actually just a CLRObject (wrapped C# instance), get it's type and try to find the best method match for it, if none, fall back to any method taking a PyObject instead. Similar to the implicit conversion matching system. Else it requires C# side to determine the PyObject type instead to handle it correctly