[Incidentally, the ".NET" in the version info is hardcoded -- is there a means
to pick up the full name of the environment, rather than just the version?
This would allow more accurate reporting between MS and 3rd party CLR
implementations.]
IronPython 0.7.2 on .NET 2.0.50215.44
Copyright (c) Microsoft Corporation. All rights reserved.
>>> from System.Collections.Generic import List
>>> __dict__
{'List':<type 'System.Collections.Generic.List`1'>}
>>> list = List[str]
>>> list
<type 'System.Collections.Generic.List`1[[System.String, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'>
>>> list.Add(1)
System.Exception: bad args to this method <method# Add on
System.Collections.Generic.List`1[[System.String, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
at IronPython.Objects.ReflectedMethodBase.Call(Object[] args)
at IronPython.Objects.Ops.Call(Object func, Object arg0)
at input_4.Run(Frame frame)
at IronPython.Hosting.PythonEngine.DoOneInteractive(Frame topFrame)
at IronPython.Hosting.PythonEngine.RunInteractive()
>>> list.Add("abc")
System.Exception: bad args to this method <method# Add on
System.Collections.Generic.List`1[[System.String, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
at IronPython.Objects.ReflectedMethodBase.Call(Object[] args)
at IronPython.Objects.Ops.Call(Object func, Object arg0)
at input_5.Run(Frame frame)
at IronPython.Hosting.PythonEngine.DoOneInteractive(Frame topFrame)
at IronPython.Hosting.PythonEngine.RunInteractive()
>>> list.Add('abc')
System.Exception: bad args to this method <method# Add on
System.Collections.Generic.List`1[[System.String, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089]]>
at IronPython.Objects.ReflectedMethodBase.Call(Object[] args)
at IronPython.Objects.Ops.Call(Object func, Object arg0)
at input_6.Run(Frame frame)
at IronPython.Hosting.PythonEngine.DoOneInteractive(Frame topFrame)
at IronPython.Hosting.PythonEngine.RunInteractive()
>>>
_______________________________________________
users-ironpython.com mailing list
users-ironpython.com@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com