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'
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 entir
>>>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
[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 s
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__.
>
>
Donovan Baarda <[EMAIL PROTECTED]> wrote:
> Josiah Carlson wrote:
> > Donovan Baarda <[EMAIL PROTECTED]> wrote:
> >
> >>Nick Coghlan wrote:
> >>
> >>>Donovan Baarda wrote:
> [...]
> >>But isn't a function just a deferred expression with a name :-)
> >
> >
> > A function in Python is actually a
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 function'.
>
> Python's lambda expressions *
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 e
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
>> 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 co
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
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
Josiah Carlson wrote:
> Donovan Baarda <[EMAIL PROTECTED]> wrote:
>
>>Nick Coghlan wrote:
>>
>>>Donovan Baarda wrote:
[...]
>>But isn't a function just a deferred expression with a name :-)
>
>
> A function in Python is actually a deferred sequence of statements and
> expressions. An anonymous f
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'
> > instea
Donovan Baarda wrote:
> Nick Coghlan wrote:
>> And here we see why I'm such a fan of the term 'deferred expression'
>> instead of 'anonymous function'.
>
> But isn't a function just a deferred expression with a name :-)
According to the specific meaning of 'expression' in the Python
grammar? No
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 function'.
But isn't a function just a defer
Donovan Baarda wrote:
> I must admit I ended up deleting most of the "alternative to lambda"
> threads after they flooded my in box. So it is with some dread I post
> this, contributing to it...
I must admit you are right. And I will stop defending my proposal
because it seems to create nothin
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.
> >
> >
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
emphati
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 w
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 as
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"
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 pa
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 (a
[Raymond Hettinger]
> This PEP is an excellent example of improving readability and usability
> by omitting a keyword and simplifying syntax. It neither provides nor
> takes away functionality; instead, it is a bit of a beautification
> effort.
>
> Essentially it creates a lighter-weight, more us
This PEP is an excellent example of improving readability and usability
by omitting a keyword and simplifying syntax. It neither provides nor
takes away functionality; instead, it is a bit of a beautification
effort.
Essentially it creates a lighter-weight, more usable syntax for
specifying defer
26 matches
Mail list logo