y, August 03, 2005 12:51 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Overloads
Martin Maly wrote:
> the Random.Next is not a static method. You can either pass the
instance as the first argument:
Hi Martin,
Yes, I figured that out a little while later. Too bad I had already ma
Martin Maly wrote:
the Random.Next is not a static method. You can either pass the instance as the
first argument:
Hi Martin,
Yes, I figured that out a little while later. Too bad I had already made
a fool of myself. ;-)
However, I think your question brings up a valid point ... how do we
Title: RE: [IronPython] Overloads
Hi Jonathan,
the Random.Next is not a static method. You can either pass the instance as the first argument:
>>> System.Random.Next[int](System.Random(), 10)
7
>>> System.Random.Next[int](System.Random(), 10, 20)
IronPython.Object
Title: RE: [IronPython] Overloads
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
Jonathan Jacobs wrote:
> Hopefully I'm just being stupid about this, but I can't seem to get this
> overload story to behave:
Okay, now that I've had lunch and am fully awake, I realise I was being
a clown. I first have to instantiate a System.Random instance, the bad
args story was obviously beca
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
>>> print System.Random.Next.__doc__
int Next()
int Next(int, int)
int Next(int)
>>> print System.Random.Nex