[Twisted-web] Class methods as callbacks/errbacks

Phil Mayers p.mayers at imperial.ac.uk
Sun Jun 5 04:44:41 EDT 2011


> Is there an alternative and/or cleaner solution to specify a class
> method as a callback or errback?

Just pass the instance method directly to addCallback:

d.addCallback(someclass.lost_conn)



More information about the Twisted-web mailing list