<p dir="ltr">I can see this both ways (bug and not a bug), so let's err on the side of bug and see if we can make the behaviour match C#.</p>
<br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 29, 2016, 23:53 Markus Schaber <<a href="mailto:m.schaber@codesys.com">m.schaber@codesys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="DE" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Hi, Slide,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Using a public abstract base class produces the same result: If the derived class is internal, the call works fine, if the derived class is public, the call does
 not work.<u></u><u></u></span></p></div></div><div lang="DE" link="blue" vlink="purple"><div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Best regards<br>
<br>
Markus Schaber</span><span lang="EN-US"><br>
<br>
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">CODESYS<sup>®</sup></span></b><span lang="EN-US">
</span><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#b1b2b3">a trademark of 3S-Smart Software Solutions GmbH</span><span lang="EN-US">
<br>
</span><b><span lang="EN-US" style="font-size:2.0pt;font-family:"Arial","sans-serif";color:#636363"><br>
</span></b><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">Inspiring Automation Solutions
</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><u></u><u></u></span></p>
<div class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<hr size="1" width="643" style="width:482.25pt" noshade style="color:#636363" align="left">
</span></div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">3S-Smart Software Solutions GmbH
<br>
Dipl.-Inf. Markus Schaber | Product Development Core Technology <br>
Memminger Str. 151 | 87439 Kempten | Germany <br>
Tel. +49-831-54031-979 | Fax +49-831-54031-50 <br>
<br>
E-Mail: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="mailto:m.schaber@codesys.com" target="_blank"><span lang="EN-US" style="color:#e3000f;text-decoration:none">m.schaber@codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
 | Web: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://www.codesys.com" target="_blank"><span lang="EN-US" style="color:#e3000f;text-decoration:none">codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
 | CODESYS store: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://store.codesys.com" target="_blank"><span lang="EN-US" style="color:#e3000f;text-decoration:none">store.codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<br>
CODESYS forum: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://forum.codesys.com" target="_blank"><span lang="EN-US" style="color:#e3000f;text-decoration:none">forum.codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<br>
<br>
</span><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner</span></i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">
 | <i>Trade register: Kempten HRB 6186</i> | <i>Tax ID No.: DE 167014915</i></span><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<u></u><u></u></span></b></p>
<div class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<hr size="1" width="643" style="width:482.25pt" noshade style="color:#636363" align="left">
</span></b></div>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received
<br>
this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure
<br>
or distribution of the material in this e-mail is strictly forbidden.</span></i><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""><u></u><u></u></span></p>
</div></div><div lang="DE" link="blue" vlink="purple"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Slide [mailto:<a href="mailto:slide.o.mix@gmail.com" target="_blank">slide.o.mix@gmail.com</a>]
<br>
<b>Sent:</b> Monday, August 29, 2016 4:24 PM<br>
<b>To:</b> Markus Schaber; Discussion of IronPython<br>
<b>Subject:</b> Re: [Ironpython-users] Binding problem with default parameters in public classes<u></u><u></u></span></p>
</div>
</div></div></div></div><div lang="DE" link="blue" vlink="purple"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<p class="MsoNormal"><u></u> <u></u></p>
<p>What happens if it's an abstract base class instead of an interface?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Mon, Aug 29, 2016, 03:25 Markus Schaber <<a href="mailto:m.schaber@codesys.com" target="_blank">m.schaber@codesys.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Hi,</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Our tests recently caught a strange regression in our application. One can make existing scripts fail
 by changing an internal class to public.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">The attached program reproduces the issue. The problem is that the method has optional parameters, but
 those are only declared at the interface.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Now, when the class changes from “internal” to “public”, IronPython binds directly to the public methods
 without considering the interfaces any more, and thus does not recognize the optional parameters.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif"">Now, the question is whether this could be considered a bug in IronPython, or whether it should be considered
 a bug to implement an interface method without replicating the default parameter values…</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif""> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Best regards<br>
<br>
Markus Schaber</span><span lang="EN-US"><br>
<br>
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">CODESYS<sup>®</sup></span></b><span lang="EN-US">
</span><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#b1b2b3">a trademark of 3S-Smart Software Solutions GmbH</span><span lang="EN-US">
<br>
</span><b><span lang="EN-US" style="font-size:2.0pt;font-family:"Arial","sans-serif";color:#636363"><br>
</span></b><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">Inspiring Automation Solutions
</span></b><u></u><u></u></p>
<div>
<div class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<hr size="1" width="643" style="width:482.25pt" noshade style="color:#636363" align="left">
</span></div>
</div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">3S-Smart Software Solutions GmbH
<br>
Dipl.-Inf. Markus Schaber | Product Development Core Technology <br>
Memminger Str. 151 | 87439 Kempten | Germany <br>
Tel. +49-831-54031-979 | Fax +49-831-54031-50 <br>
<br>
E-Mail: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="mailto:m.schaber@codesys.com" target="_blank"><span lang="EN-US" style="color:#e3000f;text-decoration:none">m.schaber@codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
 | Web: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://www.codesys.com" target="_blank"><span lang="EN-US" style="color:#e3000f;text-decoration:none">codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
 | CODESYS store: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://store.codesys.com" target="_blank"><span lang="EN-US" style="color:#e3000f;text-decoration:none">store.codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<br>
CODESYS forum: </span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363"><a href="http://forum.codesys.com" target="_blank"><span lang="EN-US" style="color:#e3000f;text-decoration:none">forum.codesys.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<br>
<br>
</span><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner</span></i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">
 | <i>Trade register: Kempten HRB 6186</i> | <i>Tax ID No.: DE 167014915</i></span><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
</span></b><u></u><u></u></p>
<div>
<div class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
<hr size="1" width="643" style="width:482.25pt" noshade style="color:#636363" align="left">
</span></b></div>
</div>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#636363">This e-mail may contain confidential and/or privileged information. If you are not the
 intended recipient (or have received <br>
this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure
<br>
or distribution of the material in this e-mail is strictly forbidden.</span></i><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#636363">
</span></b><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
Ironpython-users mailing list<br>
<a href="mailto:Ironpython-users@python.org" target="_blank">Ironpython-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/ironpython-users" target="_blank">https://mail.python.org/mailman/listinfo/ironpython-users</a><u></u><u></u></p>
</blockquote>
</div>
</div></div></div></blockquote></div>