mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-91219: http - use subclassing to override index_pages attribute (GH-100731)
Remove previously added parameter to `__init__`, and recommend subclassing to modify the `index_pages` attribute instead.
This commit is contained in:
parent
64ed609c53
commit
a286caa937
3 changed files with 9 additions and 4 deletions
|
|
@ -413,6 +413,11 @@ the current directory::
|
|||
print("serving at port", PORT)
|
||||
httpd.serve_forever()
|
||||
|
||||
|
||||
:class:`SimpleHTTPRequestHandler` can also be subclassed to enhance behavior,
|
||||
such as using different index file names by overriding the class attribute
|
||||
:attr:`index_pages`.
|
||||
|
||||
.. _http-server-cli:
|
||||
|
||||
:mod:`http.server` can also be invoked directly using the :option:`-m`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue