On Thu, Jun 2, 2011 at 3:26 PM, Algis Kabaila <akaba...@pcug.org.au> wrote: > import math > > length = math.hypot(z, math.hypot(x, y)) > > One line and fast.
The dimension is arbitrary, though, so: length = reduce(math.hypot, self._coords, 0) Cheers, Ian -- http://mail.python.org/mailman/listinfo/python-list