Great bug, thanks for reporting it! I’ve filed it on CodePlex as http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=1417

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kristof Wagemans
Sent: Wednesday, July 26, 2006 9:08 AM
To: 'Discussion of IronPython'
Subject: [IronPython] PythonEngine.EvaluateAs and future division

 

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