[BangPypers] A link I found today
Anand Balachandran Pillai
abpillai at gmail.com
Mon Oct 12 12:45:43 CEST 2009
On Mon, Oct 12, 2009 at 4:08 PM, Rajeev J Sebastian <
rajeev.sebastian at gmail.com> wrote:
>
>
> > I am not however a fan of the decimal module since it uses strings as the
> > base type.
>
> What else should it use then ?
>
Nothing. It should be taken care of in the float implementation
without needing another module to fix it.
Having to convert my float to a string to get a correct representation of
it
is indeed awkward.
>>> Decimal(1.0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.5/decimal.py", line 578, in __new__
"First convert the float to a string")
TypeError: Cannot convert float to Decimal. First convert the float to a
string
A strange error, but I agree it is required for the module to work...!
Does numpy take care of these issues ?
> Regards
> Rajeev J Sebastian
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
--
--Anand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20091012/fcce2e7d/attachment.htm>
More information about the BangPypers
mailing list