[Ironpython-users] Binding problem with default parameters in public classes

Slide slide.o.mix at gmail.com
Tue Aug 30 06:08:31 EDT 2016


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#.

On Mon, Aug 29, 2016, 23:53 Markus Schaber <m.schaber at codesys.com> wrote:

> Hi, Slide,
>
>
>
> 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.
>
>
>
> Best regards
>
> Markus Schaber
>
> *CODESYS®* a trademark of 3S-Smart Software Solutions GmbH
>
> *Inspiring Automation Solutions *
> ------------------------------
>
> 3S-Smart Software Solutions GmbH
> Dipl.-Inf. Markus Schaber | Product Development Core Technology
> Memminger Str. 151 | 87439 Kempten | Germany
> Tel. +49-831-54031-979 | Fax +49-831-54031-50
>
> E-Mail: m.schaber at codesys.com | Web: codesys.com <http://www.codesys.com>
> | CODESYS store: store.codesys.com
> CODESYS forum: forum.codesys.com
>
> *Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner* | *Trade
> register: Kempten HRB 6186* | *Tax ID No.: DE 167014915*
> * ------------------------------ *
>
>
>
> *This e-mail may contain confidential and/or privileged information. If
> you are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorised copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.*
>
> *From:* Slide [mailto:slide.o.mix at gmail.com]
> *Sent:* Monday, August 29, 2016 4:24 PM
> *To:* Markus Schaber; Discussion of IronPython
> *Subject:* Re: [Ironpython-users] Binding problem with default parameters
> in public classes
>
>
>
> What happens if it's an abstract base class instead of an interface?
>
>
>
> On Mon, Aug 29, 2016, 03:25 Markus Schaber <m.schaber at codesys.com> wrote:
>
> Hi,
>
>
>
> Our tests recently caught a strange regression in our application. One can
> make existing scripts fail by changing an internal class to public.
>
>
>
> The attached program reproduces the issue. The problem is that the method
> has optional parameters, but those are only declared at the interface.
>
>
>
> 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.
>
>
>
> 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…
>
>
>
> Best regards
>
> Markus Schaber
>
> *CODESYS®* a trademark of 3S-Smart Software Solutions GmbH
>
> *Inspiring Automation Solutions *
> ------------------------------
>
> 3S-Smart Software Solutions GmbH
> Dipl.-Inf. Markus Schaber | Product Development Core Technology
> Memminger Str. 151 | 87439 Kempten | Germany
> Tel. +49-831-54031-979 | Fax +49-831-54031-50
>
> E-Mail: m.schaber at codesys.com | Web: codesys.com <http://www.codesys.com>
> | CODESYS store: store.codesys.com
> CODESYS forum: forum.codesys.com
>
> *Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner* | *Trade
> register: Kempten HRB 6186* | *Tax ID No.: DE 167014915*
> * ------------------------------ *
>
>
>
> *This e-mail may contain confidential and/or privileged information. If
> you are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorised copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.*
>
> _______________________________________________
> Ironpython-users mailing list
> Ironpython-users at python.org
> https://mail.python.org/mailman/listinfo/ironpython-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20160830/e37ddf82/attachment.html>


More information about the Ironpython-users mailing list