From: "Greg Ewing" <[EMAIL PROTECTED]> > It has nothing to do with cyclic GC. The point is that > if the refcount of a weak reference drops to zero before > that of the object being weakly referenced, the weak > reference object itself is deallocated and its callback > is *not* called. So having the resource-using object > hold the weak ref to the resource doesn't work -- it > has to be kept in some kind of separate registry.
I'll write-up an idiomaticc approach an include it in PEP this weekend. Raymond _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com