Re: weakrefs to functions for observer pattern

2005-11-03 Thread Alex Martelli
Michael Schneider <[EMAIL PROTECTED]> wrote: ... > Thank you, I mis-read the docs. > > The mistake I made was having was using a weak reference as a key in > the dictionary. Rather than using a weakref.WeakKeyDictionary , I guess? > Weak references will be very useful for me. > > I really

Re: weakrefs to functions for observer pattern

2005-11-03 Thread Michael Schneider
Alex Martelli wrote: > 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 > "b

Re: weakrefs to functions for observer pattern

2005-11-02 Thread Alex Martelli
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

weakrefs to functions for observer pattern

2005-11-02 Thread Michael Schneider
Hello All, I am comming back to python after being away for several years. 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. --- from docs: http://www.python.org/doc/current/lib/module-