[IronPython] Singles from outer-space

Dino Viehland dinov at exchange.microsoft.com
Tue May 30 17:35:20 CEST 2006


Thanks for the bug report.  We've been looking to get parity between .NET primitives and Python primitives but it looks like we've missed constructors.  I've opened a bug on this and it should be fixed for the next release.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jonathan Jacobs
Sent: Sunday, May 28, 2006 10:28 AM
To: Discussion of IronPython
Subject: [IronPython] Singles from outer-space

Some odd behaviour with System.Single:

 >>> s = System.Single.Parse('5.2')
 >>> type(s)
<type 'Single'>
 >>> int(s)
Traceback (most recent call last):
   File , line 0, in <stdin>##50
TypeError: expected int, found Single
 >>> int(float(s))
5

--
Jonathan

When you meet a master swordsman,
show him your sword.
When you meet a man who is not a poet,
do not show him your poem.
                 -- Rinzai, ninth century Zen master _______________________________________________
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