Hello, I have been trying IronPython with the Unum module (http://home.tiscali.be/be052320/Unum.html) which, in about 400 locs, adds a complete and seamless measure units support to Python.
In Cpython2.4 I can write code like this: Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from unum.units.si import * >>> 1*M 1.000 [m] >>> 1*N/(2*M**2) 0.500 [N/m2] >>> Whereas in Ironpython (both official and community edition) I get the following error: IronPython 1.0.2463 on .NET 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. >>> from unum.units.si import * >>> 1*M 1.000 [m] >>> 1*N/(2*M**2) Traceback (most recent call last): File , line 0, in <stdin>##142 File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 566,in __repr__ File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 558,in __str__ File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 253,in normalize File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 213,in replaced File C:\tempor\IPCE-1.0r2\IPCE-1.0r2\Lib\unum\__init__.py, line 389,in __pow__ ZeroDivisionError: 0.0 cannot be raised to a negative power >>> I can investigate further but need some directions. I understand that this can be a very specific issue, but any help would be really appreciated. Best regards, Walgri _______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
