[IronPython] Crash with Action and reflection question

Michael Foord fuzzyman at voidspace.org.uk
Thu Apr 30 15:23:04 CEST 2009


Curt Hagenlocher wrote:
> On Thu, Apr 30, 2009 at 6:09 AM, Michael Foord
> <fuzzyman at voidspace.org.uk> wrote:
>   
>> The following seems to crash the IronPython 2.0.1 interpreter:
>>
>>     
>>>>> from System import Action
>>>>> Action(lambda: foo)
>>>>>           
>> Obviously it's invalid - but it kills the interpreter rather than raising an
>> exception.
>>     
>
> It's been fixed for 2.6
> (http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=19133).
> If it's a fix that you want for the 2.0 branch, feel free to open
> another item on Codeplex :).
>
>   

Thanks - not massively worried about.

>> Another way would be to get the MethodInfo. For an arbitrary .NET type from
>> inside IronPython how do I get a System.Type instance representing the type?
>>     
>
> You mean like this?
> from System.Collections.Generic import List
> runtimeType = clr.GetClrType(List)
>   

Exactly!

Thank you. I need you on IM so I can bug you with these questions more 
easily... :-)

Michael

> --
> Curt Hagenlocher
> curt at hagenlocher.org
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>   


-- 
http://www.ironpythoninaction.com/




More information about the Ironpython-users mailing list