Peter Otten <__pete...@web.de> wrote:
>so both +0.0 and -0.0 would be skipped anyway.
Maybe the coder was simply aiming for visibility. The unary minus can
be hard to spot in some circumstances. e.g.: I've sneaked a unary minus
into this maths proof, which makes it horrible (although correct):
On 30.05.15 12:09, Peter Otten wrote:
Serhiy Storchaka wrote:
On 30.05.15 10:56, Peter Otten wrote:
The following modification of the collections.Counter implementation
https://hg.python.org/cpython/rev/fe4efc0032b5
was just checked in with the line
result[elem] = 0 - count
Does this have a
Serhiy Storchaka wrote:
> On 30.05.15 10:56, Peter Otten wrote:
>> The following modification of the collections.Counter implementation
>>
>> https://hg.python.org/cpython/rev/fe4efc0032b5
>>
>> was just checked in with the line
>>
>> result[elem] = 0 - count
>>
>> Does this have an advantage over
On 30.05.15 10:56, Peter Otten wrote:
The following modification of the collections.Counter implementation
https://hg.python.org/cpython/rev/fe4efc0032b5
was just checked in with the line
result[elem] = 0 - count
Does this have an advantage over the obvious
result[elem] = -count
?
x = 0.
Steven D'Aprano wrote:
> On Sat, 30 May 2015 05:56 pm, Peter Otten wrote:
>
>> The following modification of the collections.Counter implementation
>>
>> https://hg.python.org/cpython/rev/fe4efc0032b5
>>
>> was just checked in with the line
>>
>> result[elem] = 0 - count
>>
>> Does this have
On Sat, 30 May 2015 05:56 pm, Peter Otten wrote:
> The following modification of the collections.Counter implementation
>
> https://hg.python.org/cpython/rev/fe4efc0032b5
>
> was just checked in with the line
>
> result[elem] = 0 - count
>
> Does this have an advantage over the obvious
>
> re