On Feb 26, 2015 4:00 AM, "Cem Karan" <cfkar...@gmail.com> wrote: > > > On Feb 26, 2015, at 12:36 AM, Gregory Ewing <greg.ew...@canterbury.ac.nz> wrote: > > > Cem Karan wrote: > >> I think I see what you're talking about now. Does WeakMethod > >> (https://docs.python.org/3/library/weakref.html#weakref.WeakMethod) solve > >> this problem? > > > > Yes, that looks like it would work. > > > Cool!
Sometimes I wonder whether anybody reads my posts. I suggested a solution involving WeakMethod four days ago that additionally extends the concept to non-method callbacks (requiring a small amount of extra effort from the client in those cases, but I think that is unavoidable. There is no way that the framework can determine the appropriate lifetime for a closure-based callback.)
-- https://mail.python.org/mailman/listinfo/python-list