Skip to content

Commit a0bca0a

Browse files
committed
Keyword-only argument
1 parent abd519f commit a0bca0a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/library/http.server.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ provides three different variants:
206206

207207
.. versionadded:: 3.2
208208

209-
.. method:: send_error(code, message=None, explain=None, extra_headers=None)
209+
.. method:: send_error(code, message=None, explain=None, *, extra_headers=None)
210210

211211
Sends and logs a complete error reply to the client. The numeric *code*
212212
specifies the HTTP error code, with *message* as an optional, short, human

Lib/http/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ def handle(self):
445445
while not self.close_connection:
446446
self.handle_one_request()
447447

448-
def send_error(self, code, message=None, explain=None, extra_headers=None):
448+
def send_error(self, code, message=None, explain=None, *, extra_headers=None):
449449
"""Send and log an error reply.
450450
451451
Arguments are
@@ -958,8 +958,8 @@ def guess_type(self, path):
958958

959959
def parse_range(self):
960960
"""Return a tuple of (start, end) representing the range header in
961-
the HTTP request. If the range header is missing, not resolvable,
962-
or trivial (namely "byte=-"), this returns None.
961+
the HTTP request. If the range header is missing or not resolvable,
962+
this returns None.
963963
964964
This currently only supports single part ranges.
965965

0 commit comments

Comments
 (0)