Python callback functions and static methods

Jean-Paul Calderone exarkun at divmod.com
Mon Jan 5 13:07:07 EST 2009


On Mon, 5 Jan 2009 18:00:37 +0100, Joris <djm300 at gmail.com> wrote:
>Hello,
>
>I'm trying to implement callback functionality in a static class.
>
>I have a feeling that I'm doing something against the Python philosophy and
>not some programming error but any help would be appreciated.
>

Others have explained what was wrong with your `Data` class, so I won't
bother going into that.

I will recommend that you take a look at Deferred and perhaps use it, rather
than implementing something yourself:

http://twistedmatrix.com/projects/core/documentation/howto/defer.html

Jean-Paul



More information about the Python-list mailing list