[issue8937] SimpleHTTPServer should contain usage example

New submission from anatoly techtonik <techtonik@gmail.com>: Currently SimpleHTTPServer docs contains phrase "For example usage, see the implementation of the test() function." with no reference where this test() function is located. This is not user friendly. ---------- assignee: docs@python components: Documentation messages: 107304 nosy: docs@python, techtonik priority: normal severity: normal status: open title: SimpleHTTPServer should contain usage example versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8937> _______________________________________

Senthil Kumaran <orsenthil@gmail.com> added the comment: Fixed in r82018. ---------- nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8937> _______________________________________

Senthil Kumaran <orsenthil@gmail.com> added the comment: Merged into other branches in r82020, r82022 and r82023. ---------- status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8937> _______________________________________

anatoly techtonik <techtonik@gmail.com> added the comment: Thank you. The wording can surely be improved, but it is much better than nothing. I'd reword the first para further:
The :func:`test` function in the :mod:`SimpleHTTPServer` module is an example of using :class:`SimpleHTTPRequestHandler` with :class:`BaseHTTPServer` class.
BTW, it is still bad, because: 1. I'd assume that test function is described in documentation and not located in module source 2. users usually don't know where to look for the module source - doc should be self-sufficient 3. SimpleHTTPServer.test() is a proxy call for BaseHTTPServer.test() ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8937> _______________________________________

Senthil Kumaran <orsenthil@gmail.com> added the comment: Yes, I felt the same way and that is the reason for providing extra example snippets in the same Documentation. I hope you checked that one. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8937> _______________________________________

anatoly techtonik <techtonik@gmail.com> added the comment: The example is really helpful. I was surprised to learn that SimpleHTTPServer can be called from command line with port argument. I thought it is only for testing. Another missed aspect is that it is possible to use SimpleHTTPRequestHandler with TCPServer, so HTTPServer is not required. But now I wonder about compatibility of handlers vs servers. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8937> _______________________________________

anatoly techtonik <techtonik@gmail.com> added the comment: And I am not RDM. =) ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue8937> _______________________________________
participants (2)
-
anatoly techtonik
-
Senthil Kumaran