On Sun, Feb 22, 2015 at 9:32 PM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
> Why? Do you expect that the Python garbage collector special cases callbacks
> to keep them alive even when there are no references to them? How would it
> distinguish a callback from some other function?

No no no. It's the other way around. _Something_ has to be doing those
callbacks, and it's that _something_ that should be keeping them
alive. The fact that it's a registered callback should itself *be* a
reference (and not a weak reference), and should keep it alive.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to