[IronPython] Overloads

Martin Maly martmaly at exchange.microsoft.com
Wed Aug 3 17:52:38 CEST 2005


One more thing. Random.Next is a good example to play with the overload method selection, but there is no need to do that. IronPython will resolve most cases automatically and the method selection is in place to handle the cases where IronPython doesn't seem to be doing the right thing. And we want to hear about those cases because they may be caused by the defficiency of the method resolution algorithm.

Thanks again and I hope this works for you.

Martin

________________________________________
From: Jonathan Jacobs
Sent: 8/3/2005 12:31 AM
To: users-ironpython.com at lists.ironpython.com
Cc:
Subject: [IronPython] Overloads

Hi,

I'm pleased to see 0.9 is out and the thank you message. :-)

Hopefully I'm just being stupid about this, but I can't seem to get this
overload story to behave:

>>> System.Random.Next
<method# Next on System.Random>
>>> print System.Random.Next.__doc__
int Next()
int Next(int, int)
int Next(int)
>>> print System.Random.Next[int].__doc__
int Next(int)
>>> System.Random.Next[int](5)
IronPython.Objects.PythonValueError: Bad args for the method <method#
Next on System.Random>
   at input_8.Run(Frame frame)

Any suggestions are most welcome.

--
Jonathan
_______________________________________________
users-ironpython.com mailing list
users-ironpython.com 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/20050803/76b9ebf0/attachment.html>


More information about the Ironpython-users mailing list