On May 6, 1:31 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Tue, 6 May 2008 11:52:10 +0800, "Yuan HOng" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>
> > It seems to me that rather than allowing this to happen, comparasion
> > between the two should either be mad
Dennis Lee Bieber wrote:
On Tue, 6 May 2008 11:52:10 +0800, "Yuan HOng" <[EMAIL PROTECTED]>
declaimed the following in comp.lang.python:
It seems to me that rather than allowing this to happen, comparasion
between the two should either be made correct (by convertion decimal
to float e.g.) or f
Gasto wrote:
> I still don't see why such a module exists.
There are 2.0 types of programmers: those who always use floating point,
and those who know how to use them.
--
http://mail.python.org/mailman/listinfo/python-list
2008/5/6, Wojciech Walczak <[EMAIL PROTECTED]>:
> a > 9.0 returns True because NotImplemented > 9.0 returns True.
> a < 9.0 returns False because NotImplemented < 9.0 returns False.
Sorry, it should rather be:
Decimal('0.5') > 9.0 returns True because:
Decimal('0.5') > NotImplem
2008/5/6, Yuan HOng <[EMAIL PROTECTED]>:
> It seems decimal object will always be larger than float in
> comparasion, which goes against common sense:
>
> >>> from decimal import Decimal
> >>> a = Decimal('0.5')
> >>> a > 9
> False
> >>> a > 9.0
> True
>
> It seems to me that rathe
I still don't see why such a module exists.
On 5 mayo, 21:52, "Yuan HOng" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> It seems decimal object will always be larger than float in
> comparasion, which goes against common sense:
>
> >>> from decimal import Decimal
> >>> a = Decimal('0.5')
> >>> a > 9
>
Hi,
It seems decimal object will always be larger than float in
comparasion, which goes against common sense:
>>> from decimal import Decimal
>>> a = Decimal('0.5')
>>> a > 9
False
>>> a > 9.0
True
It seems to me that rather than allowing this to happen, comparasion
between the two shoul