[prev in list] [next in list] [prev in thread] [next in thread]
List: python-list
Subject: Re: staticmethod and namespaces
From: Gregory Ewing <greg.ewing () canterbury ! ac ! nz>
Date: 2010-02-28 2:06:44
Message-ID: 7uu0q2Fb8hU1 () mid ! individual ! net
[Download RAW message or body]
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
--
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic