socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs

Dave Angel d at davea.name
Thu Aug 9 15:45:57 EDT 2012


On 08/09/2012 02:37 PM, lipska the kat wrote:
> On 09/08/12 18:39, Dennis Lee Bieber wrote:
>> On Thu, 09 Aug 2012 16:15:33 +0100, lipska the kat
>> <lipskathekat at yahoo.co.uk>  declaimed the following in
>> gmane.comp.python.general:
>>
>>
>>> in the examples in this chapter we see usage examples for
>>> socketserver.BaseRequestHandler
>>> <SNIP>
>

I don't know this module at all, so I'll make more generic comments.

> socketserver.RequestHandler is EXPLICITLY documented in section
> "20.19.3 RequestHandler Objects" yet does not exist in socketserver.py
> Does this not strike you as odd. I certainly strikes me as odd. Maybe
> it should be socketserver.BaseRequestHandler that is documented here.
>

The question should not be "is it in socketserver.py," but "does it work
as documented" ?   Some of the code is likely in C modules, and thus not
visible in any py file.

> The CLASSES socketserver.StreamRequestHandler and
> socketserver.DatagramRequestHandler are DEFINED in socketserver.py
> They are NOT Objects, they are CLASSES yet they are NOT EXPLICITLY
> documented in section 20.19.3 or any other section as far as I can tell.
>
> <SNIP>

The documentation is for the elements that the library authors expected
and intended people to be able to use.  Reasons for not documenting a
particular class or a particular function/method might include the fact
that it's considered obscure, it's unsupported and may not be available
in the future, it's there only for compatibility with an older version
and shouldn't be used in new code, or it's an implementation detail
and/or might not be visible on other platforms.  A single leading
underscore should normally be used for that last case.

 
> Is there anywhere that documents EXPLICITLY all the publicly visible
> classes in the standard library.
>>

Just because it's publicly visible doesn't necessarily mean it's part of
the intended interface.

Now, for this particular module, perhaps none of my arguments apply,
and/or there's a flawed or incomplete documentation.


-- 

DaveA




More information about the Python-list mailing list