Message85258
On Apr 2, 2009, at 3:35 PM, Josiah Carlson wrote:
>
> Josiah Carlson <josiahcarlson@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 |
|
Date |
User |
Action |
Args |
2009-04-02 19:57:40 | j1m | set | recipients:
+ j1m, gvanrossum, akuchling, facundobatista, jafo, josiahcarlson, tseaver, forest, giampaolo.rodola, kevinwatters, djarb, stutzbach, markb, intgr, mcdonc |
2009-04-02 19:57:38 | j1m | link | issue1641 messages |
2009-04-02 19:57:38 | j1m | create | |
|