[Urwid] Bug: Signal module create backreferences
ian at excess.org
Sun Apr 4 22:25:14 EDT 2010
Dominic LoBue wrote on 2010-04-04 21:20:
> I fixed the ducktype implementation to not proxy anything other than
> methods and pushed it to my branch.
Here's an example of behaviour that I don't want with your current
b = urwid.Button("test")
def react(self, b):
f = Foo()
urwid.connect_signal(b, 'click', f.react)
b.keypress((10,), ' ') # this should print "reacting"
Instead it causes an error indicating that the callback has been
removed. That's no good: a signal should be enough to keep the function
it's referencing alive.
More information about the Urwid