(Please excuse my English)
Fredrik Lundh wrote:
> is this
>
> >>> 1.0 > "0"
> False
>
> also a bug ?
It may be tolerable for unrelated types like int and list, but it's a
gross usability issue
when it comes to mixing floats and decimals. I believe the latter are
going to be mixed
and com
Sergei Organov wrote:
> Well, without reading the manuals I'd expect this to raise an exception
> instead of yielding of meaningless and confusing result, consider:
Without reading the manuals, you can only expect that Python
will be "compatible" with the ideas you have of things based
on previous
Tim Hochberg wrote:
> It's not a bug, but it is a misfeature. In 3.0, I'd love to see
> nonsensical comparisons raise TypeError, but still keep the ability to
> sort lists of heterogeneous objects. One approach would be keep cmp(x,y)
> permissive in its arguments while making __gt__ and friends st
Fredrik Lundh wrote:
> "Cassiano, Marco" wrote:
>
>
>>I have difficulties with a weird Python 2.4.2 behaviour in comparing
>>Decimal to Floats.
>>
>>For Example :
>>
>>
>>
>from decimal import Decimal
>a=Decimal('3.7')
>b=6.3
>>
>if a > b :print a,b,'a is greater than b - NOT TRUE
"Fredrik Lundh" <[EMAIL PROTECTED]> writes:
> "Cassiano, Marco" wrote:
>
>> I have difficulties with a weird Python 2.4.2 behaviour in comparing
>> Decimal to Floats.
>>
>> For Example :
>>
>>
>> >>> from decimal import Decimal
>> >>> a=Decimal('3.7')
>> >>> b=6.3
>>
>> >>> if a > b :print a,b,'a
"Cassiano, Marco" wrote:
> I have difficulties with a weird Python 2.4.2 behaviour in comparing
> Decimal to Floats.
>
> For Example :
>
>
> >>> from decimal import Decimal
> >>> a=Decimal('3.7')
> >>> b=6.3
>
> >>> if a > b :print a,b,'a is greater than b - NOT TRUE'
> ... else: print a,b,'b
Cassiano, Marco wrote:
> I have difficulties with a weird Python 2.4.2 behaviour in comparing Decimal
> to Floats.
>
> For Example :
>
>
>
from decimal import Decimal
a=Decimal('3.7')
b=6.3
>
>
if a > b :print a,b,'a is greater than b - NOT TRUE'
>
> ... else: print a,b,