[IronPython] (MS/Beta2) System.Collections.Generic.List bug?

Keith J. Farmer kfarmer at thuban.org
Wed Apr 20 01:09:44 CEST 2005


This is what I get for not having enough sleep.  I was doing this just fine a week ago -- glad to hear it wasn't some sudden breakage.
 
Forgot about those unbound methods..  Been ages since I've done foo(self, arg).
 
Re Environment:  If there isn't anything, it may be something to prod the Framework folk into adding to System.Environment.  I'm sure it'll save headaches along the lines of those error messages with the word "Microsoft" that got excised recently.  No need to have MS tracking down Ximian's bugs.

________________________________

From: users-ironpython.com-bounces at lists.ironpython.com on behalf of Jim Hugunin
Sent: Tue 4/19/2005 3:31 PM
To: Discussion of IronPython
Subject: RE: [IronPython] (MS/Beta2) System.Collections.Generic.List bug?

We're using System.Environment.Version to get the version number.  I
don't know any way to get a string specifying the implementation.  I'll
ask around and see what I can find.

[...]
 
List[str] returns a new type object List<String>.  When you print it
above you can see that it's a type rather than an instance.  You're
treating this like it's an instance of a list.  You need to make an
instance first:
>>> l = list()
>>> l.Add('hi')
>>> l.Add(2)
System.Exception: bad args to this method <method# Add on <snip>

Ordinarily you'll do this all as one call, i.e. "l = List[str]()".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4945 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20050419/5fca58a7/attachment.bin>


More information about the Ironpython-users mailing list