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

Chris Rebert clp2 at rebertia.com
Fri Nov 5 14:35:05 EDT 2010


On Fri, Nov 5, 2010 at 10:50 AM, robert roze <rbroze at yahoo.com> wrote:
> 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'
>>>>

What does the following output for you?:

import numbers
print(numbers.__file__)
print(dir(numbers))

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list