This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: SimpleHTTPServer should contain usage example
Type: Stage: resolved
Components: Documentation Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, orsenthil, techtonik
Priority: normal Keywords:

Created on 2010-06-08 05:38 by techtonik, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg107304 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-08 05:38
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.
msg107927 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-06-16 15:13
Fixed in r82018.
msg107934 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-06-16 16:46
Merged into other branches in r82020, r82022 and r82023.
msg108003 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-17 11:55
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()
msg108004 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-06-17 12:22
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.
msg108015 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-17 13:36
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.
msg108072 - (view) Author: anatoly techtonik (techtonik) Date: 2010-06-17 23:54
And I am not RDM. =)
History
Date User Action Args
2022-04-11 14:57:01adminsetgithub: 53183
2010-06-17 23:54:00techtoniksetmessages: + msg108072
2010-06-17 13:36:55techtoniksetmessages: + msg108015
2010-06-17 12:22:49orsenthilsetmessages: + msg108004
2010-06-17 11:55:42techtoniksetmessages: + msg108003
2010-06-16 16:46:21orsenthilsetstatus: open -> closed

messages: + msg107934
2010-06-16 15:13:16orsenthilsetnosy: + orsenthil
messages: + msg107927

resolution: fixed
stage: resolved
2010-06-08 05:38:53techtonikcreate