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

2014-01-26 Thread Eric V. Smith
On 01/26/2014 09:59 AM, francis wrote: > 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)

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

2014-01-26 Thread francis
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

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

2014-01-25 Thread Raymond Hettinger
On Jan 25, 2014, at 4:01 PM, Brett Cannon wrote: > As the author of the PEP and I can say that `lambda (x, y): x + y` can just > as easily be expressed as `lambda x, y: x + y` and then be called by using > *args in the argument list. Anything that gets much fancier typically calls > for a def

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

2014-01-25 Thread Brett Cannon
On Sat, Jan 25, 2014 at 12:41 AM, Greg Ewing wrote: > Brett Cannon wrote: > >> >> On Fri, Jan 24, 2014 at 10:50 AM, Ram Rachum > r...@rachum.com>> wrote: >> >> lambda (x, y): whatever >> >> http://python.org/dev/peps/pep-3113/ >> > > Part of the rationale in that PEP is that argument unpac

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

2014-01-24 Thread Serhiy Storchaka
25.01.14 07:41, Greg Ewing написав(ла): Brett Cannon wrote: On Fri, Jan 24, 2014 at 10:50 AM, Ram Rachum mailto:r...@rachum.com>> wrote: lambda (x, y): whatever http://python.org/dev/peps/pep-3113/ Part of the rationale in that PEP is that argument unpacking can always be replaced b

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

2014-01-24 Thread Nick Coghlan
On 25 January 2014 15:41, Greg Ewing wrote: > Brett Cannon wrote: >> >> >> On Fri, Jan 24, 2014 at 10:50 AM, Ram Rachum > > wrote: >> >> lambda (x, y): whatever >> >> http://python.org/dev/peps/pep-3113/ > > > Part of the rationale in that PEP is that argument unpac

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

2014-01-24 Thread Greg Ewing
Brett Cannon wrote: On Fri, Jan 24, 2014 at 10:50 AM, Ram Rachum > wrote: lambda (x, y): whatever http://python.org/dev/peps/pep-3113/ Part of the rationale in that PEP is that argument unpacking can always be replaced by an explicitly named argument and an u

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

2014-01-24 Thread Eric V. Smith
On 1/24/2014 10:50 AM, Ram Rachum wrote: > I don't like how in Python 3.x, you can't do this: > > lambda (x, y): whatever > > It's quite useful in Python 2 > > if I understand correctly, it's a side effect of such packed arguments > not being allowed in function definitions. (i.e. def instea

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

2014-01-24 Thread Brett Cannon
On Fri, Jan 24, 2014 at 10:50 AM, Ram Rachum wrote: > I don't like how in Python 3.x, you can't do this: > > lambda (x, y): whatever > > It's quite useful in Python 2 > > if I understand correctly, it's a side effect of such packed arguments not > being allowed in function definitions. (i.e.

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

2014-01-24 Thread Ram Rachum
I don't like how in Python 3.x, you can't do this: lambda (x, y): whatever It's quite useful in Python 2 if I understand correctly, it's a side effect of such packed arguments not being allowed in function definitions. (i.e. def instead of lambda) Can you please refer me to the original dis