[IronPython] IronPython 0.7.2 Released

Keith J. Farmer kfarmer at thuban.org
Wed Apr 13 10:06:25 CEST 2005


Is the calling of overloaded operators implemented?

(Mono 1.1.6 / Win32, Mapack imported)

>>> a = Matrix(3,3)
>>> a[0,0]=2.0
>>> a[0,1]=1.0
>>> a[0,2]=2.0
>>> a[1,0]=1.0
>>> a[1,1]=4.0
>>> a[1,2]=0.0
>>> a[2,0]=2.0
>>> a[2,1]=0.0
>>> a[2,2]=8.0
>>> a
2 1 2
1 4 0
2 0 8
>>> a.Inverse
0.8 -0.2 -0.2
-0.2 0.3 0.05
-0.2 0.05 0.175
>>> a * a.Inverse
IronPython.Objects.PythonTypeError: unsupported operand type(s) for *:
'Mapack.Matrix' and 'Mapack.Matrix'
in <0x005c2> IronPython.Objects.Ops:Multiply (System.Object x,
System.Object y)
in <0x00069> input_58:Run (IronPython.Objects.Frame frame)
in <0x00268> IronPython.Hosting.PythonEngine:DoOneInteractive
(IronPython.Objects.Frame topFrame)
in <0x00042> IronPython.Hosting.PythonEngine:RunInteractive ()



More information about the Ironpython-users mailing list