staticmethod and namespaces
Gregory Ewing
greg.ewing at canterbury.ac.nz
Sat Feb 27 21:06:44 EST 2010
darnzen wrote:
> Well, I got around this mess by putting all those static callbacks
> into a separate module in a new class. I set them up to call a bound
> method of that class which passes the arguments to the appropriate
> bound methods of other class instances. I just have to keep a little
> dict of the bound method callbacks when I register them with the
> class.
You're making it much more complicated than it needs to
be. Diez is right, a bound method should work provided you
keep a reference to it somewhere for as long as it's needed.
--
Greg
More information about the Python-list
mailing list