The following code gives different results. Is this expected or a bug?

 

IronPython.Compiler.Options.Division = IronPython.Compiler.DivisionOption.New;

PythonEngine _pe = new PythonEngine();

_pe.Execute("result1 = 1/2");

double result1 = Convert.ToDouble(_pe.Globals["result1"]);

double result2 = _pe.EvaluateAs<double>("1/2");

 

result1 = 0.5

result2 = 0.0

_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to