IConnector does not document a subclass method that needs to be implemented

[email protected]
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from thomasvs <[email protected]>:

Trying to grok the listenX code flow, I passed through interfaces.IConnector and base.BaseConnector.

In base.BaseConnector's implementation:
 * _makeTransport() gets called.  First of all, the underscore suggests this is a private method (does twisted prefer using one underscore for methods for subclasses ?) Second, if subclasses are supposed to implement this, then this should be documented somewhere no ? Is this considered part of the interface, or part of the BaseConnector implementation ?

 * stylistical issues: doing self.transport = transport = self._makeTransport(): using transport there is useless if it's only used once two lines after; it actually adds characters instead of saving them !

 * other style issues: connectionFailed and connectionLost share 4 lines of code; could be factored out.

With some quick pointers on this ticket on how to go I can provide a patch.

----------
Type     : enhancement
Component: core
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/3967
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.