From f03facfe901d63df4ba83dab0677eb1379b7cb2c Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 26 Mar 2007 20:28:28 +0000 Subject: [PATCH] Some nits. --- Doc/lib/libhttplib.tex | 5 ++--- Doc/lib/libsocket.tex | 12 ++++++------ Lib/httplib.py | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Doc/lib/libhttplib.tex b/Doc/lib/libhttplib.tex index 67371a4bb7c..328ae9d5dd2 100644 --- a/Doc/lib/libhttplib.tex +++ b/Doc/lib/libhttplib.tex @@ -32,12 +32,11 @@ An \class{HTTPConnection} instance represents one transaction with an HTTP server. It should be instantiated passing it a host and optional port number. If no port number is passed, the port is extracted from the host string if it has the form \code{\var{host}:\var{port}}, else the default HTTP port (80) is -used. -When True the optional parameter \var{strict} +used. When True, the optional parameter \var{strict} causes \code{BadStatusLine} to be raised if the status line can't be parsed as a valid HTTP/1.0 or 1.1 status line. If the optional \var{timeout} parameter is given, connection attempts will timeout after that many -seconds (if no timeout is passed, or is passed as None, the global default +seconds (if it is not given or \code{None}, the global default timeout setting is used). For example, the following calls all create instances that connect to diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex index c63b52b20bc..d6aab50ccd4 100644 --- a/Doc/lib/libsocket.tex +++ b/Doc/lib/libsocket.tex @@ -171,12 +171,12 @@ supported on this platform. \end{datadesc} \begin{funcdesc}{create_connection}{address\optional{, timeout}} -Connects to the \var{address} received (as usual, a pair host/port), with -an optional timeout for the connection. Specially useful for higher-level -protocols, it is not normally used directly from application-level code. -Passing the optional \var{timeout} parameter will set the timeout on the -socket instance (if not present, or passed as None, the global default -timeout setting is used). +Connects to the \var{address} received (as usual, a \code{(host, port)} +pair), with an optional timeout for the connection. Specially useful for +higher-level protocols, it is not normally used directly from +application-level code. Passing the optional \var{timeout} parameter +will set the timeout on the socket instance (if it is not given or +\code{None}, the global default timeout setting is used). \end{funcdesc} \begin{funcdesc}{getaddrinfo}{host, port\optional{, family\optional{, diff --git a/Lib/httplib.py b/Lib/httplib.py index 008f0a497c7..d420f46710c 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -659,7 +659,8 @@ class HTTPConnection: def connect(self): """Connect to the host and port specified in __init__.""" - self.sock = socket.create_connection((self.host,self.port), self.timeout) + self.sock = socket.create_connection((self.host,self.port), + self.timeout) def close(self): """Close the connection to the HTTP server."""