[IronPython] Adding a string to a float - bug

Haibo Luo haiboluo at exchange.microsoft.com
Fri May 5 17:49:43 CEST 2006


Thanks for the bug. We will try to fix it in next release.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Friday, May 05, 2006 8:46 AM
To: Discussion of IronPython
Subject: [IronPython] Adding a string to a float - bug

Hello all,

Another IronPython peculiarity (present in beta 6) :

CPython :

Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> 2.4 + 'ff'
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for +: 'float' and 'str'
 >>>


IronPython :

IronPython 1.0.60420 (Beta) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
 >>> 2.0 + 'ff'
Traceback (most recent call last):
  File , line 0, in input##0
  File mscorlib, line unknown, in System.IConvertible.ToDouble
  File mscorlib, line unknown, in ToDouble
  File mscorlib, line unknown, in Parse
  File mscorlib, line unknown, in ParseDouble
  File mscorlib, line unknown, in StringToNumber
SystemError: Input string was not in a correct format.
 >>>

This makes it harder to trap these errors. :-)

All the best,


Michael Foord
http://www.resolversystems.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