[Twisted-Python] AFactory

Bruce Mitchener bruce at cubik.org
Thu Jul 25 11:03:34 EDT 2002


Zooko wrote:
>>The normal idiom here is to have your "userapp" inherit from protocol.Factory.
>>The default "factory" implementation does set itself as an attribute on the
>>protocols it builds...
> 
> Ah!  Of course.  Thanks.
> 
> I tend to prefer other techniques (like AFactory) over inheritance when
> possible, but since inheritance is the Twisted Way, I'll do it that way.  
> 
> Maybe this idiom should be added to plugin.html?

Well, it'd also be nice to see coverage of when to implement a Service, 
what's involved in doing so, and all that .. maybe a higher level 
document about "Writing your application with Twisted" would be more 
appropriate for that though.

  - Bruce





More information about the Twisted-Python mailing list