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
Martin From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Drucker Sent: Wednesday, August 03, 2005 1:02 PM To: Discussion of IronPython Subject: RE: [IronPython] 'map' not working the same betweenIronPython-0.7.xand IronPython-0.9? 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 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: foo() takes exactly
1 argument, (97 given) This seems like it should work since
filesraw is enumerable and in fact, I can do the
following: for file in
filesraw:
print file |
_______________________________________________ users-ironpython.com mailing list users-ironpython.com@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com