[Twisted-Python] Another approach to allowing __init__ to work with Deferreds

Terry Jones terry.jones at gmail.com
Tue May 12 03:18:51 EDT 2009


Hi again Drew

I realized I could have added another reason why I like my approach (for my
current situation):

I'm changing an existing (i.e., deployed) class so that its __init__ calls
something returning a deferred which some instance methods of my class rely
on having fired. I already have other code that uses my class, and that
code is all written to use my class in the regular way. I could go change
all those calls, but that gets me into a further mess as some of those
calls are in the __init__ methods of still other classes... So I'd have to
go change all the uses of those classes too.

This part of my preference for my solution is due to having the class
already deployed. It's not really part of the core problem, just my
particular situation.

Terry




More information about the Twisted-Python mailing list