diff options
author | Martin Panter <vadmium+py@gmail.com> | 2017-01-24 00:29:11 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2017-01-24 00:29:11 (GMT) |
commit | 574ff0680fbaeec1033f2301d527c4c784921ccb (patch) | |
tree | 0a39255de2c877830a0e83bddccacfeb9d587d7e | |
parent | 9cf20a664cf17becca3e2e6ef25df90508f3b308 (diff) | |
parent | ef107ee7a0a8ee27b0a54c542e3918807c981f83 (diff) | |
download | cpython-574ff0680fbaeec1033f2301d527c4c784921ccb.zip cpython-574ff0680fbaeec1033f2301d527c4c784921ccb.tar.gz cpython-574ff0680fbaeec1033f2301d527c4c784921ccb.tar.bz2 |
Issues #29189: Merge indentation fixes from 3.5
-rw-r--r-- | Doc/library/json.rst | 22 | ||||
-rw-r--r-- | Doc/library/urllib.request.rst | 78 |
2 files changed, 50 insertions, 50 deletions
diff --git a/Doc/library/json.rst b/Doc/library/json.rst index ed238e2..8103c61 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -505,27 +505,27 @@ Exceptions .. exception:: JSONDecodeError(msg, doc, pos, end=None) - Subclass of :exc:`ValueError` with the following additional attributes: + Subclass of :exc:`ValueError` with the following additional attributes: - .. attribute:: msg + .. attribute:: msg - The unformatted error message. + The unformatted error message. - .. attribute:: doc + .. attribute:: doc - The JSON document being parsed. + The JSON document being parsed. - .. attribute:: pos + .. attribute:: pos - The start index of *doc* where parsing failed. + The start index of *doc* where parsing failed. - .. attribute:: lineno + .. attribute:: lineno - The line corresponding to *pos*. + The line corresponding to *pos*. - .. attribute:: colno + .. attribute:: colno - The column corresponding to *pos*. + The column corresponding to *pos*. .. versionadded:: 3.5 diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 473effc..5a10f95 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -170,15 +170,15 @@ The :mod:`urllib.request` module defines the following functions: If both lowercase and uppercase environment variables exist (and disagree), lowercase is preferred. - .. note:: + .. note:: - If the environment variable ``REQUEST_METHOD`` is set, which usually - indicates your script is running in a CGI environment, the environment - variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is - because that variable can be injected by a client using the "Proxy:" HTTP - header. If you need to use an HTTP proxy in a CGI environment, either use - ``ProxyHandler`` explicitly, or make sure the variable name is in - lowercase (or at least the ``_proxy`` suffix). + If the environment variable ``REQUEST_METHOD`` is set, which usually + indicates your script is running in a CGI environment, the environment + variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is + because that variable can be injected by a client using the "Proxy:" HTTP + header. If you need to use an HTTP proxy in a CGI environment, either use + ``ProxyHandler`` explicitly, or make sure the variable name is in + lowercase (or at least the ``_proxy`` suffix). The following classes are provided: @@ -1407,48 +1407,48 @@ some point in the future. :class:`URLopener` objects will raise an :exc:`OSError` exception if the server returns an error code. - .. method:: open(fullurl, data=None) + .. method:: open(fullurl, data=None) - Open *fullurl* using the appropriate protocol. This method sets up cache and - proxy information, then calls the appropriate open method with its input - arguments. If the scheme is not recognized, :meth:`open_unknown` is called. - The *data* argument has the same meaning as the *data* argument of - :func:`urlopen`. + Open *fullurl* using the appropriate protocol. This method sets up cache and + proxy information, then calls the appropriate open method with its input + arguments. If the scheme is not recognized, :meth:`open_unknown` is called. + The *data* argument has the same meaning as the *data* argument of + :func:`urlopen`. - .. method:: open_unknown(fullurl, data=None) + .. method:: open_unknown(fullurl, data=None) - Overridable interface to open unknown URL types. + Overridable interface to open unknown URL types. - .. method:: retrieve(url, filename=None, reporthook=None, data=None) + .. method:: retrieve(url, filename=None, reporthook=None, data=None) - Retrieves the contents of *url* and places it in *filename*. The return value - is a tuple consisting of a local filename and either an - :class:`email.message.Message` object containing the response headers (for remote - URLs) or ``None`` (for local URLs). The caller must then open and read the - contents of *filename*. If *filename* is not given and the URL refers to a - local file, the input filename is returned. If the URL is non-local and - *filename* is not given, the filename is the output of :func:`tempfile.mktemp` - with a suffix that matches the suffix of the last path component of the input - URL. If *reporthook* is given, it must be a function accepting three numeric - parameters: A chunk number, the maximum size chunks are read in and the total size of the download - (-1 if unknown). It will be called once at the start and after each chunk of data is read from the - network. *reporthook* is ignored for local URLs. + Retrieves the contents of *url* and places it in *filename*. The return value + is a tuple consisting of a local filename and either an + :class:`email.message.Message` object containing the response headers (for remote + URLs) or ``None`` (for local URLs). The caller must then open and read the + contents of *filename*. If *filename* is not given and the URL refers to a + local file, the input filename is returned. If the URL is non-local and + *filename* is not given, the filename is the output of :func:`tempfile.mktemp` + with a suffix that matches the suffix of the last path component of the input + URL. If *reporthook* is given, it must be a function accepting three numeric + parameters: A chunk number, the maximum size chunks are read in and the total size of the download + (-1 if unknown). It will be called once at the start and after each chunk of data is read from the + network. *reporthook* is ignored for local URLs. - If the *url* uses the :file:`http:` scheme identifier, the optional *data* - argument may be given to specify a ``POST`` request (normally the request type - is ``GET``). The *data* argument must in standard - :mimetype:`application/x-www-form-urlencoded` format; see the - :func:`urllib.parse.urlencode` function. + If the *url* uses the :file:`http:` scheme identifier, the optional *data* + argument may be given to specify a ``POST`` request (normally the request type + is ``GET``). The *data* argument must in standard + :mimetype:`application/x-www-form-urlencoded` format; see the + :func:`urllib.parse.urlencode` function. - .. attribute:: version + .. attribute:: version - Variable that specifies the user agent of the opener object. To get - :mod:`urllib` to tell servers that it is a particular user agent, set this in a - subclass as a class variable or in the constructor before calling the base - constructor. + Variable that specifies the user agent of the opener object. To get + :mod:`urllib` to tell servers that it is a particular user agent, set this in a + subclass as a class variable or in the constructor before calling the base + constructor. .. class:: FancyURLopener(...) |