[issue1641] asyncore delayed calls feature

Jim Fulton report at bugs.python.org
Thu Apr 2 21:57:40 CEST 2009


Jim Fulton <jim at zope.com> added the comment:

On Apr 2, 2009, at 3:35 PM, Josiah Carlson wrote:

>
> Josiah Carlson <josiahcarlson at users.sourceforge.net> added the  
> comment:
>
> I'm not defending the documentation, I'm merely reposting it.
>
> The documentation for asyncore says, "The full set of methods that can
> be overridden in your subclass follows:"
>
> The documentation for asynchat says, "To make practical use of the  
> code
> you must subclass async_chat, providing meaningful
> collect_incoming_data() and found_terminator() methods. The
> asyncore.dispatcher methods can be used, although not all make sense  
> in
> a message/response context."
>
> How can we make the documentation better?  I'm too close to the
> documentation to really know how to improve it.  Ideas?

Actually, the documentation is better than I remember it to be. The  
problem is that subclassing is a much more intimate interface between  
components that a call interface.  In the case of asyncore, the  
methods being overridden have non-trivial default implementations.  
Overriding methods often entails studying the base-class code to get  
an idea how it should be done. The subclassing interface for asynchat  
appears to be much cleaner, but even then, you need to study the base  
class code to make sure you haven't accidentally overridden any base  
class attributes.  I wish classes that exposed subclassing interfaces  
were more careful with their internal names.

Jim

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1641>
_______________________________________


More information about the Python-bugs-list mailing list