[Ironpython-users] Implicit conversion of objects to float

Vernon Cole vernondcole at gmail.com
Mon Feb 27 17:53:26 CET 2012


On Mon, Feb 27, 2012 at 9:20 AM, Jeff Hardy <jdhardy at gmail.com> wrote:

> <snip> ...
>  I added conversions from System.Decimal to decimal.Decimal in
> 2.7.2, but I didn't think about implicit conversions of other types.
> I'm thinking now that anything that's either a System.Decimal or
> implicitly convertible to System.Decimal should be accepted.
>
> - Jeff
>

Thank you, Jeff!   I'll go remove the workaround from my source code
(actually move it to an exception handler).
[For those who don't know -- Jeff has just fixed a work item I originally
reported in 2008.  Somebody by him a beer!]

I would agree that implicit conversions should also be included in the
fix.  Any data which is "decimalish" should be handled as a decimal to
avoid the necessity for the programmer to specify back-and-forth
conversions.
--
Vernon Cole
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120227/f20cb6e6/attachment.html>


More information about the Ironpython-users mailing list