Re: Multiline lamba implementation in python.

2007-06-15 Thread Josh Gilbert
On Wednesday 13 June 2007 4:04 am, Duncan Booth wrote: > "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > But you already have "multiline" lambdas right now in that sense, no > > need to add anything. I think you were talking about lambdas *with* > > statements inside. > > > > bin = lambda x:((

Re: Multiline lamba implementation in python.

2007-06-13 Thread Duncan Booth
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > But you already have "multiline" lambdas right now in that sense, no > need to add anything. I think you were talking about lambdas *with* > statements inside. > > bin = lambda x:((x&8 and '*' or '_') + > (x&4 and '*' or '_') + >

Re: Multiline lamba implementation in python.

2007-06-12 Thread Gabriel Genellina
En Tue, 12 Jun 2007 20:48:41 -0300, Josh Gilbert <[EMAIL PROTECTED]> escribió: > Guido doesn't want multiline lambdas, that's a really good reason not to > add > them. They are, on the other hand, very useful at times. Even if he did > add > multiline lambdas it's not certain that he would a

Re: Multiline lamba implementation in python.

2007-06-12 Thread Kay Schluehr
On 12 Jun., 20:17, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 12, 11:36 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > > > > > On 12 Jun., 16:54, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > On Jun 12, 10:12 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > > > > > On 12 Jun., 14:57, Facundo

Re: Multiline lamba implementation in python.

2007-06-12 Thread Steve Howell
--- Josh Gilbert <[EMAIL PROTECTED]> wrote: > > I know that the standard Python response is that you > might as well define a > function, indeed, the name might provide useful > documentation. In reality, > however, the vast majority of my anonymous functions > are callbacks (tends to > lead to na

Re: Multiline lamba implementation in python.

2007-06-12 Thread Josh Gilbert
On 6/12/07, Facundo Batista <[EMAIL PROTECTED]> wrote: Josh Gilbert wrote: > I don't expect multiline lambdas to be added to Python. I'm not so sure that > that's a bad thing. Regardless, isn't it possible to write your own Yes, it is a bad thing. Why? Because it would another way to do somet

Re: Multiline lamba implementation in python.

2007-06-12 Thread George Sakkis
On Jun 12, 11:36 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > On 12 Jun., 16:54, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Jun 12, 10:12 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > > > > On 12 Jun., 14:57, Facundo Batista <[EMAIL PROTECTED]> wrote: > > > > > Remember that the *only*

Re: Multiline lamba implementation in python.

2007-06-12 Thread Kay Schluehr
On 12 Jun., 16:54, George Sakkis <[EMAIL PROTECTED]> wrote: > On Jun 12, 10:12 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > > > On 12 Jun., 14:57, Facundo Batista <[EMAIL PROTECTED]> wrote: > > > > Remember that the *only* difference between the two functions is that > > > one is anonymous, and fo

Re: Multiline lamba implementation in python.

2007-06-12 Thread George Sakkis
On Jun 12, 10:12 am, Kay Schluehr <[EMAIL PROTECTED]> wrote: > On 12 Jun., 14:57, Facundo Batista <[EMAIL PROTECTED]> wrote: > > > Remember that the *only* difference between the two functions is that > > one is anonymous, and for other you have to came up with a name (name > > that if is well thou

Re: Multiline lamba implementation in python.

2007-06-12 Thread Kay Schluehr
On 12 Jun., 14:57, Facundo Batista <[EMAIL PROTECTED]> wrote: > Remember that the *only* difference between the two functions is that > one is anonymous, and for other you have to came up with a name (name > that if is well thought, actually adds readibility to your code). The difference is that

Re: Multiline lamba implementation in python.

2007-06-12 Thread Facundo Batista
Josh Gilbert wrote: > I don't expect multiline lambdas to be added to Python. I'm not so sure that > that's a bad thing. Regardless, isn't it possible to write your own Yes, it is a bad thing. Why? Because it would another way to do something you can do in other way. The *only* big value of lam

Re: Multiline lamba implementation in python.

2007-06-12 Thread Carsten Haese
On Tue, 12 Jun 2007 02:29:31 -0700, exhuma.twn wrote > lambdas are to be removed in Py3k IIRC. No. From http://www.python.org/dev/peps/pep-3099/, "At one point lambda was slated for removal in Python 3000. Unfortunately no one was able to come up with a better way of providing anonymous functions.

Re: Multiline lamba implementation in python.

2007-06-12 Thread exhuma.twn
On Jun 12, 5:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 12 Jun 2007 00:02:37 -0300, Josh Gilbert > <[EMAIL PROTECTED]> escribió: > > > I don't expect multiline lambdas to be added to Python. I'm not so sure > > that > > that's a bad thing. Regardless, isn't it possible to write

Re: Multiline lamba implementation in python.

2007-06-11 Thread Gabriel Genellina
En Tue, 12 Jun 2007 00:02:37 -0300, Josh Gilbert <[EMAIL PROTECTED]> escribió: > I don't expect multiline lambdas to be added to Python. I'm not so sure > that > that's a bad thing. Regardless, isn't it possible to write your own > implementation of multiline lambdas as functions? Wouldn't tha