<div dir="ltr"><div dir="ltr">This link below is probably a good staring point for "<span style="font-family:monospace,monospace">TypeError: No method matches given arguments</span>". But ideally we should bring back the skipping of method resolution logic within a context manager whenever the user knows what he/she is doing. There is also explicit `.Overloads` option to force through one of the overloaded methods.</div><div dir="ltr"><div><br></div><div><a href="https://github.com/pythonnet/pythonnet/issues/265">https://github.com/pythonnet/pythonnet/issues/265</a><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 2, 2018 at 10:11 AM Mohamed Koubaa <<a href="mailto:mohamed.koubaa@ansys.com">mohamed.koubaa@ansys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I am using the 2.3 release branch.</div><div><br></div><div>I have C# code like this:</div><div><div><font face="monospace, monospace">    public class A {</font></div><div><font face="monospace, monospace">        public A() {...}</font></div><div><font face="monospace, monospace">    }</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">    public class B </font><span style="font-family:monospace,monospace">{</span></div><div><font face="monospace, monospace">        public B() </font><font face="monospace, monospace">{...</font><span style="font-family:monospace,monospace">}</span></div><div><font face="monospace, monospace">        public static void Func(IEnumerable<A> input)</font><span style="font-family:monospace,monospace">{</span></div><div><font face="monospace, monospace">        }</font></div><div><font face="monospace, monospace">    }</font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><span style="font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I want to pass in a python list to Func but get this error:</span></font></div><div><font face="monospace, monospace"><div>>>> b=B()</div><div>>>> b.Func([A(), A()])</div><div>Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div><div>TypeError: No method matches given arguments</div><div><br></div><div>

<span style="font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I tried both IEnumerable and IList in the signature of 'Func'.  I know that I can import System and create some .NET collection type and it works well.</span></div><div><span style="font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Did I miss anything?  Is this usage pattern within the design goals of pythonnet?  I assume this would have to be fixed in MethodBinder but I wanted to try asking here first.</span><br></div><div><span style="font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Thanks!</span></div><div><span style="font-family:arial,sans-serif;font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Mohamed Koubaa</span></div></font></div></div>
_________________________________________________<br>
Python.NET mailing list - <a href="mailto:PythonDotNet@python.org" target="_blank">PythonDotNet@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/pythondotnet" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/pythondotnet</a><br>
</blockquote></div>