lambda functions

Chris Rebert clp2 at
Mon Aug 31 09:51:07 CEST 2009

On Mon, Aug 31, 2009 at 12:41 AM, Pierre<pierre.gaillard at> wrote:
> Hello,
> I would like to know if it is possible to define a loop in a lambda
> function....

Not possible. Lambdas can only contain a single expression. A loop is
a block statement.
Just use a named function instead. There's nothing that can be done
with a lambda that can't be done with a named function instead.


More information about the Python-list mailing list