RE: [IronPython] lambda form

2005-05-09 Thread Jim Hugunin
Timothy Fitz wrote: > On 5/8/05, Luis M. Gonzalez <[EMAIL PROTECTED]> wrote: > > Regarding lambda, map and reduce, Guido Van Rossum has said several > times > > that these built-ins are amongst its "Python regrets". > > > > This is what he said in a recent interview: > > > > - If you could change s

Re: [IronPython] lambda form

2005-05-08 Thread Timothy Fitz
On 5/8/05, Luis M. Gonzalez <[EMAIL PROTECTED]> wrote: > Regarding lambda, map and reduce, Guido Van Rossum has said several times > that these built-ins are amongst its "Python regrets". > > This is what he said in a recent interview: > > - If you could change some things that have been done i

[IronPython] lambda form

2005-05-08 Thread Luis M. Gonzalez
Regarding lambda, map and reduce, Guido Van Rossum has said several times that these built-ins are amongst its "Python regrets".   This is what he said in a recent interview:   - If you could change some things that have been done in the  langage, what would it be ?Drop lambda, filter, map

Re: [IronPython] lambda form

2005-05-08 Thread PhiHo Hoang
Jim Hugunin wrote: March Liu wrote: > lambda key word may remove from CPython 3.0. Maybe we can replace it > by the other way as List Comprehensions, funcation Factory... I like to encourage people who come from a functional background to use list comprehensions instead of lambda when possible. I

RE: [IronPython] lambda form

2005-05-07 Thread Jim Hugunin
March Liu wrote: > lambda key word may remove from CPython 3.0. Maybe we can replace it > by the other way as List Comprehensions, funcation Factory... I like to encourage people who come from a functional background to use list comprehensions instead of lambda when possible. I'm not sure that la

Re: [IronPython] lambda form

2005-05-07 Thread March Liu
lambda key word may remove from CPython 3.0. Maybe we can replace it by the other way as List Comprehensions, funcation Factory... 2005/5/7, Travis Watkins <[EMAIL PROTECTED]>: > On 5/7/05, PhiHo Hoang <[EMAIL PROTECTED]> wrote: > > Greetings, > > > > Does IronPython support lambda form ? > >

Re: [IronPython] lambda form

2005-05-07 Thread Travis Watkins
On 5/7/05, PhiHo Hoang <[EMAIL PROTECTED]> wrote: > Greetings, > > Does IronPython support lambda form ? > > Is this make_inc correct ? > > Thanks, > > PhiHo > > >>> def make_inc(n): > ... return lambda x : x + n > ... > >>> f = make_inc(100) > >>> f(1) > IronPython.Objects

[IronPython] lambda form

2005-05-07 Thread PhiHo Hoang
Greetings, Does IronPython support lambda form ? Is this make_inc correct ? Thanks, PhiHo def make_inc(n): ... return lambda x : x + n ... f = make_inc(100) f(1) IronPython.Objects.PythonNameError: name 'n' is not defined at IronPython.Objects.Frame.GetGlobal(String name) at inp