[IronPython] Error when using Options.FastEval

Szymon Kobalczyk s.kobalczyk at softwaremind.pl
Fri Sep 30 10:54:33 CEST 2005


Last time I wrote here I was concerned with memory consumption and 
performance of embedding IronPython. I decided then to use the FastEval 

I think I found some error in this mode. In code below the last line 
would throw "Key not found in dictionary." exception caused by the 
"None" term. When you don't use the FastEval the code runs properly.

        static void Main(string[] args)
            IronPython.AST.Options.FastEval = true;
            IronPython.AST.Options.DoNotSaveBinaries = true;

            PythonEngine engine = new PythonEngine();

            engine.SetVariable("item", null);
            object value = engine.Evaluate("item == None");

Also, could you please explain what exactly are the differences between 
the two modes.

Szymon Kobalczyk.

More information about the Ironpython-users mailing list