I really don't understand Lambda!
ianb at colorstudy.com
Fri Oct 11 02:23:21 CEST 2002
On Thu, 2002-10-10 at 18:49, Bob van der Poel wrote:
> Just when I thought I was understanding lambda, it totally confuses me.
> I have the following statement in my program, which works:
> wg.bind("<Return>", lambda s=wg: seq.setSize(wg) )
I think you want:
wg.bind("<Return>", lambda e, s=wg: seq.setSize(s))
The callback is always called with the event as the one argument (even
if you don't care about the event).
More information about the Python-list