Terry Reedy wrote:
Documenting the problem properly would mean changing the set
documentation ... from their current
math set based definitions to implementation based definitions
It could be documented that the mathematical definitions
hold only if the equality relations between all the elem
Mark Dickinson wrote:
Option (2) appeals to me, but I can't see how to
implement it.
It could be implemented for the special case of floats
and Decimals by keeping flags in each set indicating
whether any elements of those types have been added.
But doing this just for those two types would b
On Sep 30, 8:07 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Documenting the problem properly would mean changing the set
> documentation to change at least the definitions of union (|), issubset
> (<=), issuperset (>=), and symmetric_difference (^) from their current
> math set based definitions t
Mark Dickinson wrote:
On Sep 30, 9:21 am, Terry Reedy <[EMAIL PROTECTED]> wrote:
If no one beats me to it, I will probably file a bug report or two, but
I am still thinking about what to say and to suggest.
I can't see many good options here. Some possibilities:
Thanks for responding. Agre
On Sep 30, 9:21 am, Terry Reedy <[EMAIL PROTECTED]> wrote:
> If no one beats me to it, I will probably file a bug report or two, but
> I am still thinking about what to say and to suggest.
I can't see many good options here. Some possibilities:
(0) Do nothing besides documenting the problem
some
Gabriel Genellina wrote:
En Thu, 25 Sep 2008 08:02:49 -0300, Mark Dickinson <[EMAIL PROTECTED]>
escribió:
On Sep 23, 1:58 pm, Robert Lehmann <[EMAIL PROTECTED]> wrote:
I don't see why transitivity should apply to Python objects in general.
Hmmm. Lack of transitivity does produce some, um, in
En Thu, 25 Sep 2008 08:02:49 -0300, Mark Dickinson <[EMAIL PROTECTED]>
escribió:
On Sep 23, 1:58 pm, Robert Lehmann <[EMAIL PROTECTED]> wrote:
I don't see why transitivity should apply to Python objects in general.
Hmmm. Lack of transitivity does produce some, um, interesting
results when pl
Mark Dickinson <[EMAIL PROTECTED]> wrote:
>On Sep 25, 8:55 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
>> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> >0.1 actually is
>>
>> >In [98]: '%.50f' % 0.1
>> >Out[98]: '0.1555111512312578270211815834045410'
>> >?
>>
>> 0.1 i
Mark Dickinson <[EMAIL PROTECTED]> wrote:
>On Sep 25, 8:55 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
>> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>> >0.1 actually is
>>
>> >In [98]: '%.50f' % 0.1
>> >Out[98]: '0.1555111512312578270211815834045410'
>> >?
>>
>> Actually, i
Mark Dickinson wrote:
On Sep 24, 6:18 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
If there is not now, there could be in the future, and the decimal
authors are committed to follow the standard wherever it goes.
Therefore, the safe course, to avoid possible future deprecations due to
doing too mu
On Sep 23, 1:58 pm, Robert Lehmann <[EMAIL PROTECTED]> wrote:
> I don't see why transitivity should apply to Python objects in general.
Hmmm. Lack of transitivity does produce some, um, interesting
results when playing with sets and dicts. Here are sets s and
t such that the unions s | t and t |
Tim Roberts <[EMAIL PROTECTED]> wrote:
> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> >
> >On Tue, 23 Sep 2008 07:08:07 -0700, Michael Palmer wrote:
> >
> >>> > This seems to break the rule that if A is equal to B and B is equal
> >>> > to C then A is equal to C.
> >>>
> >>> I don't see w
On Sep 25, 8:55 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> >0.1 actually is
>
> >In [98]: '%.50f' % 0.1
> >Out[98]: '0.1555111512312578270211815834045410'
> >?
>
> Actually, it's not. Your C run-time library is generating rand
On Sep 24, 6:18 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> If there is not now, there could be in the future, and the decimal
> authors are committed to follow the standard wherever it goes.
> Therefore, the safe course, to avoid possible future deprecations due to
> doing too much, is to only do
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
>On Tue, 23 Sep 2008 07:08:07 -0700, Michael Palmer wrote:
>
>>> > This seems to break the rule that if A is equal to B and B is equal
>>> > to C then A is equal to C.
>>>
>>> I don't see why transitivity should apply to Python objects in genera
On Wed, 24 Sep 2008 04:30:03 -0500, Nick Craig-Wood wrote:
> Both the Fraction module and the Decimal module could represent floats
> exactly and reversibly since floats are of the form
>
> mantissa * 2**exponent
>
> which is exactly representable as a fraction (rational) and also as
>
> m
Mark Dickinson wrote:
On Sep 23, 7:31 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
Decimal is something of an anomaly in Python because it was written to
exactly follow an external standard, with no concessions to what would
be sensible for Python. It is possible that that standard mandates that
On Sep 23, 7:31 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> Decimal is something of an anomaly in Python because it was written to
> exactly follow an external standard, with no concessions to what would
> be sensible for Python. It is possible that that standard mandates that
> Decimals not comp
Terry Reedy <[EMAIL PROTECTED]> wrote:
> The new fractions module acts differently, which is to say, as most
> would want.
>
> >>> from fractions import Fraction as F
> >>> F(1) == 1.0
> True
> >>> F(1.0)
> Traceback (most recent call last):
> File "", line 1, in
> F(1.0)
>
On Tue, 23 Sep 2008 07:08:07 -0700, Michael Palmer wrote:
>> > This seems to break the rule that if A is equal to B and B is equal
>> > to C then A is equal to C.
>>
>> I don't see why transitivity should apply to Python objects in general.
>
> Well, for numbers it surely would be a nice touch, w
Gerhard Häring wrote:
D'Arcy J.M. Cain wrote:
I'm not sure I follow this logic. Can someone explain why float and
integer can be compared with each other and decimal can be compared to
integer but decimal can't be compared to float?
from decimal import Decimal
i = 10
f = 10.0
d = Decimal("10.
On Sep 23, 10:08 am, Michael Palmer <[EMAIL PROTECTED]> wrote:
> May be the reason for Decimal to accept float arguments is that
NOT to accept float arguments.
--
http://mail.python.org/mailman/listinfo/python-list
> > This seems to break the rule that if A is equal to B and B is equal to C
> > then A is equal to C.
>
> I don't see why transitivity should apply to Python objects in general.
Well, for numbers it surely would be a nice touch, wouldn't it.
May be the reason for Decimal to accept float argument
On Tue, 23 Sep 2008 07:20:12 -0400, D'Arcy J.M. Cain wrote:
> I'm not sure I follow this logic. Can someone explain why float and
> integer can be compared with each other and decimal can be compared to
> integer but decimal can't be compared to float?
In comparisons, `Decimal` tries to convert
D'Arcy J.M. Cain wrote:
I'm not sure I follow this logic. Can someone explain why float and
integer can be compared with each other and decimal can be compared to
integer but decimal can't be compared to float?
from decimal import Decimal
i = 10
f = 10.0
d = Decimal("10.00")
i == f
True
i ==
25 matches
Mail list logo