[IronPython] PythonEngine.EvaluateAs and future division
Martin Maly
Martin.Maly at microsoft.com
Sat Jul 29 00:02:16 CEST 2006
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: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060728/bab6e37c/attachment.html>
More information about the Ironpython-users
mailing list