print statement in lambda expression

Skip Montanaro skip at pobox.com
Sat Feb 2 22:48:17 EST 2002


    Michael> I just recently found that I couldn't put a print statement in
    Michael> a lambda expression as a binding in Tk. Could someone explain
    Michael> why?

Lambdas are restricted to a single expression in their body.

-- 
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)




More information about the Python-list mailing list