decimal.py ver 2.6,2.7 not working with python 2.7

robert roze rbroze at yahoo.com
Fri Nov 5 13:50:13 EDT 2010


I have a 'Python 2.7' installed.

It seems like the decimal.py module that comes with the Python2.7 package is not 
working. I hope I'm wrong, but here's why I think so:

If I simply try to import the module, I get this error:

>>> import decimal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/ictools/python_2_7/lib/python2.7/decimal.py", line 3700, in 
<module>
    _numbers.Number.register(Decimal)
AttributeError: 'module' object has no attribute 'Number'
>>>

But, if I download, and import the 2.5 version of decimal.py, it imports with no 
complaint.

In the 2.5 version of decimal.py, there is no reference to '_numbers' like there 
is in the 2.6 and 2.7 versions. 


Is this a bug, or is there something I can do to fix it (as a user, with limited 
permissions)? I don't feel good about continuing to run with the 2.5 decimal.py, 
since I'll be using alot of numpy and other modules that use decimal, and I 
don't know how they'll react.

Thanks,
Bob


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101105/1718b32d/attachment.html>


More information about the Python-list mailing list