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
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
[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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
18 matches
Mail list logo