Rocco> However, I've also tried this: Rocco> def accumulator(n): Rocco> return lambda x: nonlocal n = n + x
Rocco> and unfortunately it gave me a syntax error. I don't see any Rocco> reason why this kind of code should not be possible. Rocco> What do you all think? Lambdas only support a single expression, not statements and that's not going to change in 3.0. Skip _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com