I have a C# class that looks a little like:
public class MyClass
{
private Func processMethod = (ds) =>
I did some further Googling and found a page about the darker corners of IronPython: http://www.voidspace.org.uk/ironpython/dark-corners.shtml
What I should be doing is this:
from MyApp import myObj #instance of MyClass
import clr
clr.AddReference('System.Core')
from System import Func
def OtherMethod(ds):
if ds.Data.Length > 0 :
quot = sum(ds.Data.Real)/sum(ds.Data.Imag)
return quot
return 0.0
myObj.ProcessMethod = Func[IDataSource, object](OtherMethod)