Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-21 Thread Nick Coghlan
Guido van Rossum wrote: [Nick Coghlan] And here we see why I'm such a fan of the term 'deferred expression' instead of 'anonymous function'. Python's lambda expressions *are* the former, but they are emphatically *not* the latter. Let me emphatically disagree. Your POV is entirely

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-21 Thread Josiah Carlson
Nick Coghlan wrote: Guido van Rossum wrote: But as long as we are describing the present state we should call a spade a spade, etc. I guess I take a syntactic view of the status quo, because, while lambdas may be implemented as anonymous functions, the current syntax doesn't let me

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-20 Thread Guido van Rossum
[Nick Coghlan] And here we see why I'm such a fan of the term 'deferred expression' instead of 'anonymous function'. Python's lambda expressions *are* the former, but they are emphatically *not* the latter. Let me emphatically disagree. Your POV is entirely syntactical, which IMO is a

[Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-20 Thread Jim Jewett
lambda x,y: x+y*y lambda x,y: y**2+x are essentialy the same functions with different implementations [1]. Except that they are not. Think of __pow__, think of __add__ and __radd__. You know the difference between the concept of a function and it's

Re: [Python-Dev] Recommend accepting PEP 312 --Simple Implicit Lambda

2005-06-19 Thread Josiah Carlson
Donovan Baarda [EMAIL PROTECTED] wrote: Nick Coghlan wrote: Donovan Baarda wrote: As I see it, a lambda is an anonymous function. An anonymous function is a function without a name. And here we see why I'm such a fan of the term 'deferred expression' instead of 'anonymous

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-19 Thread Kay Schluehr
Donovan Baarda wrote: I don't get what the problem is with mixing statement and expression semantics... from a practial point of view, statements just offer a superset of expression functionality. If there really is a serious practical reason why they must be limited to expressions, why

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-19 Thread Reinhold Birkenfeld
Kay Schluehr wrote: Reduction provides often the advantage to make expressions/statements scriptable what they are not in Python. Python is strong in scripting classes/objects ( a big plus of the language ) but you can't simply use the language to prove that lambda x,y:

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-19 Thread Skip Montanaro
As I see it, a lambda is an anonymous function. An anonymous function is a function without a name. We already have a syntax for a function... why not use it. ie: f = filter(def (a): return a 1, [1,2,3]) Kay You mix expressions with statements. You could remove

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-19 Thread Kay Schluehr
Reinhold Birkenfeld wrote: lambda x,y: x+y*y lambda x,y: y**2+x are essentialy the same functions with different implementations [1]. Except that they are not. Think of __pow__, think of __add__ and __radd__. You know the difference between the concept of

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-19 Thread Kay Schluehr
Skip Montanaro wrote: As I see it, a lambda is an anonymous function. An anonymous function is a function without a name. We already have a syntax for a function... why not use it. ie: f = filter(def (a): return a 1, [1,2,3]) Kay You mix expressions with

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-19 Thread Reinhold Birkenfeld
Kay Schluehr wrote: Reinhold Birkenfeld wrote: lambda x,y: x+y*y lambda x,y: y**2+x are essentialy the same functions with different implementations [1]. Except that they are not. Think of __pow__, think of __add__ and __radd__. You know the difference

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-18 Thread Kay Schluehr
Nick Coghlan wrote: Guido van Rossum wrote: Recommend accepting just the basic PEP which only targets simple, obvious cases. The discussed extensions are unattractive and should be skipped. -1. The unary colon looks unPythonic to me. Step 1 would be to require parentheses around the

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-18 Thread Josiah Carlson
Kay Schluehr [EMAIL PROTECTED] wrote: Maybe anonymus function closures should be pushed forward right now not only syntactically? Personally I could live with lambda or several of the alternative syntaxes listed on the wiki page. But asking for a favourite syntax I would skip the def

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-18 Thread Kay Schluehr
Josiah Carlson wrote: Kay Schluehr [EMAIL PROTECTED] wrote: Maybe anonymus function closures should be pushed forward right now not only syntactically? Personally I could live with lambda or several of the alternative syntaxes listed on the wiki page. But asking for a

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-18 Thread Donovan Baarda
Kay Schluehr wrote: Josiah Carlson wrote: Kay Schluehr [EMAIL PROTECTED] wrote: Maybe anonymus function closures should be pushed forward right now not only syntactically? Personally I could live with lambda or several of the alternative syntaxes listed on the wiki page. I

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-18 Thread Nick Coghlan
Donovan Baarda wrote: As I see it, a lambda is an anonymous function. An anonymous function is a function without a name. And here we see why I'm such a fan of the term 'deferred expression' instead of 'anonymous function'. Python's lambda expressions *are* the former, but they are

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-18 Thread Josiah Carlson
Kay Schluehr [EMAIL PROTECTED] wrote: Josiah Carlson wrote: Kay Schluehr [EMAIL PROTECTED] wrote: The arrow is a straightforward punctuation for function definitions. Reusing existing keywords for different semantics seems to me as a kind of inbreeding. That's starting to

Re: [Python-Dev] Recommend accepting PEP 312 -- Simple Implicit Lambda

2005-06-17 Thread Nick Coghlan
Guido van Rossum wrote: Recommend accepting just the basic PEP which only targets simple, obvious cases. The discussed extensions are unattractive and should be skipped. -1. The unary colon looks unPythonic to me. Step 1 would be to require parentheses around the whole thing (ala