> The dimension is arbitrary, though, so: > > length = reduce(math.hypot, self._coords, 0) >
Thanks, I was going to ask Algis that same question. But still, is this solution really faster or better than the one using list comprehension and the expression 'x*x'? It seems to me that the above solution (using hypot) involves repeated square roots (with subsequent squaring). Best regards, Gabriel. -- http://mail.python.org/mailman/listinfo/python-list