On 01/26/2014 03:42 AM, Raymond Hettinger wrote:
I think that is an over-simplification. The argument unpacking was handy
in a number of situations where *args wouldn't suffice:
lambda (px, py), (qx, qy): ((px - qx) ** 2 + (py - qy) ** 2) ** 0.5
IIRC, the original reason for the change was that it simplified the
compiler a bit,
not that it was broken or not useful.
I'm not sure if that's applicable or other issues arise with:
def fn(*p): px,py,qx,qy = p; return ((px - qx) ** 2 + (py - qy) ** 2) ** 0.5
Thanks in advance!
Francis
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com