Observer pattern thoughts
David Eppstein
eppstein at ics.uci.edu
Thu Mar 6 17:54:46 EST 2003
In article <20030306154232.7eb31309.gry at ll.mit.edu>,
george young <gry at ll.mit.edu> wrote:
> Why require an observer to
> observable.register(self)
> and define a member update(self), when it seems like the observable
> could just take a callable object and call it:
How do you unregister? You'd need to store the identity of the callable
somewhere, since (e.g. if it's an object method) you can't simply
generate it again and get a callable with the same identity.
--
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list
mailing list