mirror of https://github.com/python/cpython
Fixed docs for urlretrieve() to match code in the case of opening a local file.
Also some typos and removed trailing whitespace on the lines.
This commit is contained in:
parent
c22b2999f6
commit
317ad7a5ee
|
@ -61,7 +61,7 @@ redirected URL.
|
|||
If the \var{url} uses the \file{http:} scheme identifier, the optional
|
||||
\var{data} argument may be given to specify a \code{POST} request
|
||||
(normally the request type is \code{GET}). The \var{data} argument
|
||||
must in standard \mimetype{application/x-www-form-urlencoded} format;
|
||||
must be in standard \mimetype{application/x-www-form-urlencoded} format;
|
||||
see the \function{urlencode()} function below.
|
||||
|
||||
The \function{urlopen()} function works transparently with proxies
|
||||
|
@ -78,7 +78,7 @@ the proxy server before starting the Python interpreter. For example
|
|||
...
|
||||
\end{verbatim}
|
||||
|
||||
In a Windows environment, if no proxy envvironment variables are set,
|
||||
In a Windows environment, if no proxy environment variables are set,
|
||||
proxy settings are obtained from the registry's Internet Settings
|
||||
section.
|
||||
|
||||
|
@ -119,10 +119,9 @@ If the URL points to a local file, or a valid cached copy of the
|
|||
object exists, the object is not copied. Return a tuple
|
||||
\code{(\var{filename}, \var{headers})} where \var{filename} is the
|
||||
local file name under which the object can be found, and \var{headers}
|
||||
is either \code{None} (for a local object) or whatever the
|
||||
\method{info()} method of the object returned by \function{urlopen()}
|
||||
returned (for a remote object, possibly cached). Exceptions are the
|
||||
same as for \function{urlopen()}.
|
||||
is whatever the \method{info()} method of the object returned by
|
||||
\function{urlopen()} returned (for a remote object, possibly cached).
|
||||
Exceptions are the same as for \function{urlopen()}.
|
||||
|
||||
The second argument, if present, specifies the file location to copy
|
||||
to (if absent, the location will be a tempfile with a generated name).
|
||||
|
@ -172,7 +171,7 @@ Clear the cache that may have been built up by previous calls to
|
|||
|
||||
\begin{funcdesc}{quote}{string\optional{, safe}}
|
||||
Replace special characters in \var{string} using the \samp{\%xx} escape.
|
||||
Letters, digits, and the characters \character{_,.-} are never quoted.
|
||||
Letters, digits, and the characters \character{_.-} are never quoted.
|
||||
The optional \var{safe} parameter specifies additional characters
|
||||
that should not be quoted --- its default value is \code{'/'}.
|
||||
|
||||
|
@ -182,7 +181,8 @@ Example: \code{quote('/\~{}connolly/')} yields \code{'/\%7econnolly/'}.
|
|||
\begin{funcdesc}{quote_plus}{string\optional{, safe}}
|
||||
Like \function{quote()}, but also replaces spaces by plus signs, as
|
||||
required for quoting HTML form values. Plus signs in the original
|
||||
string are escaped unless they are included in \var{safe}.
|
||||
string are escaped unless they are included in \var{safe}. It also
|
||||
does not have \var{safe} default to \code{'/'}.
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{unquote}{string}
|
||||
|
|
Loading…
Reference in New Issue