math module for Decimals

alex goretoy aleksandr.goretoy at gmail.com
Mon Jan 5 11:50:17 EST 2009


>
> Hmm.  Maybe we shouldn't be using this syntax in from_float, if it's
> the only thing that prevents the trunk version of decimal.py from
> being used with Python 2.4.  On the other hand, from_float isn't
> going to work until 2.7 anyway, since it uses a whole bunch of
> new stuff:  as_integer_ratio and copysign (both introduced in 2.6),
> and bit_length (introduced in 2.7).
>

I so new to python that I'm not sure that anything I can say may help as
much as someone with more experience. I would leave is compatability to be
decided by what other functions it relies on.(as_integer_ratio and copysign)
Throw the rest out the window.

Since that would make this function more bulky and I don't think there will
be that many people wanting to use it with 2.4, OTOH I'm using BackTrack2
and it comes with python2.4.3

I started building my little program using ubuntu with python2.5.x, then I
started to use my other option for dual-boot. Backtrack2 is an old time
favorite and is alot faster for me to use when running X,firefox(with
anywhere from 15-100 tabs open),konqueror,etc

Ialready installed other versions of python for bt, no problem there. I'm
just wondering about this import error in decimal.py inside python2.7a0(svn
repo), don't let curiosity kill this cat.

I just wanted to let All know what decimal.py is doing on my pc. Maybe I'm
the only one getting this? This version of python2.7 is from python's svn
repo. Is the python repo considered to be unstable(wrong word?) and this is
expected?

I get this when importing decimal:

Python 2.7a0 (trunk:68339M, Jan  5 2009, 05:18:41)
[GCC 3.4.6] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import decimal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/decimal.py", line 138, in <module>
    import math as _math
ImportError: No module named math
>>>


Are other people seeing this as well? Just curious.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090105/b001e1c3/attachment.html>


More information about the Python-list mailing list