Re: [IronPython] Array Access Problem

2005-05-05 Thread Bob Ippolito
On May 5, 2005, at 3:02 PM, Sriram Krishnan wrote: However, any time that I think about changing an invariant of the Python language I get rather nervous about the ramifications... One ramification that I can instantly think of is looping over an array of valuetypes. On more than one occasion,

RE: [IronPython] Array Access Problem

2005-05-05 Thread Sriram Krishnan
>However, any time that I think about changing an invariant of the Python language I get rather nervous about the > ramifications... One ramification that I can instantly think of is looping over an array of valuetypes. On more than one occasion, doing a foreach over an array of structs in C# ha

RE: [IronPython] Array Access Problem

2005-05-05 Thread Jim Hugunin
This is a known problem, but we don't have a good fix to it in IronPython. Here's how to set just the X value of a Point in an array today: apt[0] = Point(0, apt[0].Y) OR p = apt[0] p.X = 42 apt[0] = p I suspect that you're not very excited by either of these options. The problem is that Po

[IronPython] Array Access Problem

2005-05-05 Thread Kirk Olynyk
I can’t seem to change the members of an array. Is this a known problem?   import sys   sys.LoadAssemblyByName("System") sys.LoadAssemblyByName("System.Drawing")   from System import* from System.Drawing import *   apt = Array.CreateInstance(Point, 1) apt[0] = Point(1,2) print a