On Sat, Apr 26, 2014 at 11:03 PM, Philipp A. <email@example.com> wrote:
> in python, the most similar thing is something like this:
> 'key1': lambda: eggs += lay_eggs(), #branch 1Except that lambda doesn't create a code block, it creates a nested
function. This example won't work, and nor will anything else that
needs to mutate locals; you'd have to declare an out-of-line function
(as with branch_2_3) to be able to assign to 'nonlocal eggs'.
Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/