< snip second buggy solution >
So all I am seeing is that these things of anonymous/lambda functions
are evil in Python, because of the lexical/binding thing...
Well lambda's are not evil per-se, although they do have a few
quirks. Technically though, this:
g = lambda x: f(x)
is same as
On Wed, 2008-08-20 at 15:17 -0400, Daniel Miller wrote:
> Ahh, sorry, that will have the same problem you had before. Here's a
> better version:
:-)
> def slotmaker(button):
> def slot():
> self.button_clicked(button)
> button.__slot = slot
>
> for button in [ ... ]:
>