[IronPython] Method overload

Fabio clicklist at gmail.com
Sun Jan 8 07:13:20 CET 2006


Thank you, Martin

And when we develop new classes in IronPython, already exists some guideline
about method overload? Using the previous example, if I wish create a "
System.Console" class with in a "Write()" method with 18 overloads?

Regards
Fabio

2006/1/8, Martin Maly <Martin.Maly at microsoft.com>:
>
>  Yes, it will work on .NET. IronPython will try to find the 'best fit'
> among the overloads based on types of arguments that you pass to the method
> call. There may be cases when IronPython may not choose the right method …
> and we want to hear about those cases so we can fix them.
>
>
>
> Martin
>
>
>  ------------------------------
>
> *From:* users-bounces at lists.ironpython.com [mailto:
> users-bounces at lists.ironpython.com] *On Behalf Of *Fabio
> *Sent:* Saturday, January 07, 2006 4:42 PM
> *To:* IronPython
> *Subject:* [IronPython] Method overload
>
>
>
> I'm studing IronPython and I liked very much!
>
>
>
> But I have one question.
>
>
>
> In .Net Framework, several classes has method overload. In my study,
> Python does not support method overload, and when we define  methods with
> the same name, they are redefined then only the last is used.
>
>
>
> How IronPython handle this? By example, the method "System.Console.Write()"
> has 18 overloads! This will work in .Net?
>
>
>
> Regards
>
> Fabio
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060108/6bb8be3d/attachment.html>


More information about the Ironpython-users mailing list