finding euclidean distance,better code?

Gerard Flanagan grflanagan at
Sat Mar 29 13:45:55 CET 2008

On Mar 29, 11:01 am, Steven D'Aprano <st... at REMOVE-THIS-> wrote:
> On Sat, 29 Mar 2008 10:11:28 +0100, Roel Schroeven wrote:
> > Steven D'Aprano schreef:
> >> On Fri, 28 Mar 2008 16:59:59 +0100, Robert Bossy wrote:
> >>> Gabriel Genellina wrote:
> >>>> That's what I said in another paragraph. "sum of coordinates" is
> >>>> using a different distance definition; it's the way you measure
> >>>> distance in a city with square blocks. I don't know if the distance
> >>>> itself has a name, but
> >>> I think it is called Manhattan distance in reference of the walking
> >>> distance from one point to another in this city.
> >> You know, there are other cities than Manhattan. Some of them even have
> >> streets and blocks.
> > I'm not sure what your point is. The name
> "The" name? You go on to list four additional names, so why do you say
> that "Manhattan distance" is THE name? When I studied this at university,
> we called it the taxi metric.
> > of the distance happens to be
> > Manhattan distance (or taxicab distance, rectilinear distance, L1
> > distance, city block distance; see
> > so Robert has a valid
> > point.
> Wikipedia doesn't believe that M-D is the primary or most common name,
> and the link you give redirects to "Taxicab distance". Googlefight
> agrees: "Taxicab distance" is more than twice as common, and "rectilinear
> distance" more than five times as common.
> My point was to draw attention to Robert's unconscious assumptions which
> are reflected in his choice of language. Rectilinear distance applies to
> more than "distance from one point to another in THIS city" (emphasis
> added).
> It applies in parts of Rome, Sydney, London, Moscow and many other
> places. It even applies to sleepy little country towns like Bendigo and
> Mildura here in Australia. Manhattan is hardly the only place where
> cities are carved up into rectangular or square city blocks, and I doubt

a metric by any other name...

More information about the Python-list mailing list