This is an interesting bug. The method resolution actually chooses the
better method to call from the parameter binding perspective, but
unfortunatelly, the map method then doesn't do what it
should.
Again, this is something I am going to fix soon. Thanks for the great
repro, Steven
Mart
The ref argument is, unfortunatelly, a bug. The conversion code tries to
convert int into int& which it fails to do. I'll get the fix out in the
next release.
Martin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jonathan Jacobs
Sent: Wednesday, August 0
I know that this isn’t a solution,
but, since map() may get deprecated sooner or later, why don’t you use a
list comprehension?
[foo(a) for a in filesraw]
Line above should do the trick.
--Thane
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stev
Typo in the sample – should read:
filesraw = System.IO.Directory.GetFiles(‘D:\\temp\\photos’);
--S
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steven Drucker
Sent: Wednesday, August 03, 2005
12:55 PM
To:
users-ironpython.com@lists.ironpython.com
Subject:
I used to be able to do the following code:
def foo(a):
print a;
filesraw =
System.IO.Directory(‘D:\\temp\\photos”);
map(foo,filesraw);
and it would work just fine.
Now, however, this is no longer working.
The error I get is as follows:
PythonTypeError: f
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
I used to be able to do the following code:
def foo(a):
print a;
filesraw = System.IO.Directory(‘D:\\temp\\photos”);
map(foo,filesraw);
and it would work just fine.
Now, however, this is no longer working.
The error I get is as follows:
PythonTypeError: f
Title: RE: [IronPython] IronPython 0.9 released
I am not aware of any such effort being under way. We are, however, keenly aware of the need have the kind of documentation you are referring to.
Martin
From: Richard Hsu
Sent: 8/2/2005 6:22 PM
To:
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.Objects.PythonValueError: Ba
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 seem
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
12 matches
Mail list logo