[Twisted-Python] Basic question about the architecture of twisted.internet

Peter Jacobi pjacobi.de at googlemail.com
Mon Oct 13 10:49:03 EDT 2008

Dear All,

I've just started diving into Twisted, read the docs, run the samples, wrote
some tests, but:

I'm rather clueless about some architectural decisions in Twisted Core, and
perhaps somebody can clarify whether these are just hictorical accidents or
serve a purpose I didn't get yet.

Specifically I don't understand why the Factory classes in internet/protocols.py
rely on class variables instead of instance variables for, most
importantly "protocol",
but also for "noisy" and "numPorts"?

Won't this introduce an unwanted coupling between different instances
of Factory,
and effectively make the creation of more than instance of any Factory-derived
class pointless (or even incorrect). Sort of a singleton pattern relying on the
trust principle?


More information about the Twisted-Python mailing list