Michael Schneider <[EMAIL PROTECTED]> wrote:

> I would like to use weak refs in an observer pattern implementation.
> The problme that I have seems to be that weakrefs can't manage functions.

They can manage just fine functions written in *Python*, just not
"builtin functions*, i.e., ones written in *C*.  Just wrap any builtin
function you need to register as observer into a tiny Python-coded
wrapper and live happily ever after.
   ...
> Not all objects can be weakly referenced; those objects which can 
> include class instances, functions written in Python (but not in C), 


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to