[IronPython] IronPython 2.0.1 repr of floats on non UK Windows
Dave Fugate
dfugate at microsoft.com
Thu Jun 4 01:34:25 CEST 2009
Under German 32-bit Vista SP1 I get the following:
C:\Users\merllab.REDMOND\Desktop\IronPython-2.0.1>ipy.exe
IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3074
Type "help", "copyright", "credits" or "license" for more information.
>>> repr(0.1)
'0.10000000000000001'
>>> #Make sure we're really localized
>>> try:
... 1/0
... except Exception, e:
... print e.message
...
Es wurde versucht, durch 0 (null) zu teilen.
>>> ^Z
C:\Users\merllab.REDMOND\Desktop\IronPython-2.0.1>type blah.cs
using System;
public class Blah {
public static void Main() {
System.Console.WriteLine(0.1);
}
}
C:\Users\merllab.REDMOND\Desktop\IronPython-2.0.1>blah.exe
0,1
Are you sure this isn't IronPython 1.x?
Thanks,
Dave
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dave Fugate
Sent: Wednesday, June 03, 2009 4:19 PM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython 2.0.1 repr of floats on non UK Windows
Thanks for reporting this Michael. It's a known issue (see http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=14022), but actually should be working under IP 2.0...
-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Wednesday, June 03, 2009 3:17 PM
To: Discussion of IronPython
Subject: [IronPython] IronPython 2.0.1 repr of floats on non UK Windows
Hello guys,
Is this a known issue?
WinXP SP3 Spanish
>>> repr(0.1)
'0,10000000000000001'
Notice the comma instead of the decimal point. This is honoring the
locale but screwing anything that tries to use the string programattically.
Michael
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list