d at davea
Aug 9, 2012, 12:45 PM
Post #9 of 10
On 08/09/2012 02:37 PM, lipska the kat wrote:
Re: socketserver.BaseRequestHandler and socketserver.StreamRequestServer docs
[In reply to]
> 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> declaimed the following in
>>> in the examples in this chapter we see usage examples for
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.
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.