[Python-ideas] PEP 485: A Function for testing approximate equality

Ron Adam ron3200 at gmail.com
Mon Jan 26 21:06:29 CET 2015



On 01/26/2015 01:37 PM, Antoine Pitrou wrote:
> On Mon, 26 Jan 2015 11:26:59 -0800
> Chris Barker<chris.barker at noaa.gov>  wrote:
>> >
>>> > >Simplicity has its virtues.
>> >
>> >But which is more simple? I came to the conclusion that the asymmetric was
>> >simpler to explain and reason about in any case.
> Symmetricity removes any uncertainty as to parameter order.

Correct, it uses either the closer or further from zero value.  But it 
seems to me it's not better than just using the asymmetric one as if it was 
a symmetric function.  The difference is you have both options with the 
asymmetric version, including alternating the order if you want.

Or, a symmetric version can use an average, in which case it can't be used 
for anything other than relative distance comparisons.  (Not relative value 
comparisons.)

Ron






More information about the Python-ideas mailing list