A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/132100.html below:

[Python-Dev] lambda (x, y):

[Python-Dev] lambda (x, y):francis francismb at email.de
Sun Jan 26 15:59:36 CET 2014
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


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4