On Wed, Jul 4, 2018 at 7:31 PM, Gregory Ewing
<greg.ew...@canterbury.ac.nz> wrote:
> Ian Kelly wrote:
>>
>> I can't now write all my statements as:
>>
>> f(f := lambda f: do_something())
>
>
> No, but you should be able to do
>
>    (f := lambda f: do_something())(f)
>
> although since you're binding f in a scope that can be seen
> by the lambda, there's probably not much point in passing it,
> you could just do
>
>    (f := lambda: do_something())()

Not inside a loop, no.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to