[Python-ideas] Add dict.getkey() and set.get()

Steven D'Aprano steve at pearwood.info
Sun Sep 15 01:26:54 CEST 2013

On Sat, Sep 14, 2013 at 01:56:25PM -0400, Terry Reedy wrote:
> > and even my quick example isn't
> >a completely absurd data type (it would need to be fleshed out better,
> >but a FuzzyNumber could well have sensible purposes).
> The only absurd thing is calling similarity 'equality' ;=).

While I agree with the general thrust of your post, I'd like to point 
out that the creator of APL, Ken Iverson did not agree with you. A 
couple of relevant quotes:

In an early talk Ken was explaining the advantages of tolerant 
comparison. A member of the audience asked incredulously, “Surely you 
don’t mean that when A=B and B=C, A may not equal C?” Without skipping a 
beat, Ken replied, “Any carpenter knows that!” and went on to the next 
— quoted by Paul Berry

The intransitivity of [tolerant] equality is well known in practical 
situations and can be easily demonstrated by sawing several pieces of 
wood of equal length. In one case, use the first piece to measure 
subsequent lengths; in the second case, use the last piece cut to 
measure the next. Compare the lengths of the two final pieces.
— Richard Lathwell, APL Comparison Tolerance, APL76, 1976

Mathematicians and programmers treat transitivity as far more 
fundamental than it actually is in real life :-)


More information about the Python-ideas mailing list