[Python-ideas] A "local" pseudo-function

Chris Angelico rosuav at gmail.com
Sun Apr 29 16:47:03 EDT 2018


On Mon, Apr 30, 2018 at 6:45 AM, Tim Peters <tim.peters at gmail.com> wrote:
> [Chris Angelico <rosuav at gmail.com>]
>> So maybe the effective semantics should be:
>>
>> >>> (lambda a=3: (lambda b=a+1: (a, b))())()
>> (3, 4)
>
> Almost, but by that point the idea that this is already "easily
> spelled" via lambdas has become ludicrously difficult to argue with a
> straight face ;-)

Oh, I dunno, I've seen people argue that PHP is the right choice of language :-)

ChrisA


More information about the Python-ideas mailing list