Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit ef107ee

Browse files
committed
Issue python#29189: Fix indentation in RST markup
1 parent b1b985d commit ef107ee

2 files changed

Lines changed: 50 additions & 50 deletions

File tree

Doc/library/json.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -487,27 +487,27 @@ Exceptions
487487

488488
.. exception:: JSONDecodeError(msg, doc, pos, end=None)
489489

490-
Subclass of :exc:`ValueError` with the following additional attributes:
490+
Subclass of :exc:`ValueError` with the following additional attributes:
491491

492-
.. attribute:: msg
492+
.. attribute:: msg
493493

494-
The unformatted error message.
494+
The unformatted error message.
495495

496-
.. attribute:: doc
496+
.. attribute:: doc
497497

498-
The JSON document being parsed.
498+
The JSON document being parsed.
499499

500-
.. attribute:: pos
500+
.. attribute:: pos
501501

502-
The start index of *doc* where parsing failed.
502+
The start index of *doc* where parsing failed.
503503

504-
.. attribute:: lineno
504+
.. attribute:: lineno
505505

506-
The line corresponding to *pos*.
506+
The line corresponding to *pos*.
507507

508-
.. attribute:: colno
508+
.. attribute:: colno
509509

510-
The column corresponding to *pos*.
510+
The column corresponding to *pos*.
511511

512512
.. versionadded:: 3.5
513513

Doc/library/urllib.request.rst

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,15 @@ The :mod:`urllib.request` module defines the following functions:
173173
If both lowercase and uppercase environment variables exist (and disagree),
174174
lowercase is preferred.
175175

176-
.. note::
176+
.. note::
177177

178-
If the environment variable ``REQUEST_METHOD`` is set, which usually
179-
indicates your script is running in a CGI environment, the environment
180-
variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
181-
because that variable can be injected by a client using the "Proxy:" HTTP
182-
header. If you need to use an HTTP proxy in a CGI environment, either use
183-
``ProxyHandler`` explicitly, or make sure the variable name is in
184-
lowercase (or at least the ``_proxy`` suffix).
178+
If the environment variable ``REQUEST_METHOD`` is set, which usually
179+
indicates your script is running in a CGI environment, the environment
180+
variable ``HTTP_PROXY`` (uppercase ``_PROXY``) will be ignored. This is
181+
because that variable can be injected by a client using the "Proxy:" HTTP
182+
header. If you need to use an HTTP proxy in a CGI environment, either use
183+
``ProxyHandler`` explicitly, or make sure the variable name is in
184+
lowercase (or at least the ``_proxy`` suffix).
185185

186186

187187
The following classes are provided:
@@ -1388,48 +1388,48 @@ some point in the future.
13881388
:class:`URLopener` objects will raise an :exc:`OSError` exception if the server
13891389
returns an error code.
13901390

1391-
.. method:: open(fullurl, data=None)
1391+
.. method:: open(fullurl, data=None)
13921392

1393-
Open *fullurl* using the appropriate protocol. This method sets up cache and
1394-
proxy information, then calls the appropriate open method with its input
1395-
arguments. If the scheme is not recognized, :meth:`open_unknown` is called.
1396-
The *data* argument has the same meaning as the *data* argument of
1397-
:func:`urlopen`.
1393+
Open *fullurl* using the appropriate protocol. This method sets up cache and
1394+
proxy information, then calls the appropriate open method with its input
1395+
arguments. If the scheme is not recognized, :meth:`open_unknown` is called.
1396+
The *data* argument has the same meaning as the *data* argument of
1397+
:func:`urlopen`.
13981398

13991399

1400-
.. method:: open_unknown(fullurl, data=None)
1400+
.. method:: open_unknown(fullurl, data=None)
14011401

1402-
Overridable interface to open unknown URL types.
1402+
Overridable interface to open unknown URL types.
14031403

14041404

1405-
.. method:: retrieve(url, filename=None, reporthook=None, data=None)
1405+
.. method:: retrieve(url, filename=None, reporthook=None, data=None)
14061406

1407-
Retrieves the contents of *url* and places it in *filename*. The return value
1408-
is a tuple consisting of a local filename and either an
1409-
:class:`email.message.Message` object containing the response headers (for remote
1410-
URLs) or ``None`` (for local URLs). The caller must then open and read the
1411-
contents of *filename*. If *filename* is not given and the URL refers to a
1412-
local file, the input filename is returned. If the URL is non-local and
1413-
*filename* is not given, the filename is the output of :func:`tempfile.mktemp`
1414-
with a suffix that matches the suffix of the last path component of the input
1415-
URL. If *reporthook* is given, it must be a function accepting three numeric
1416-
parameters: A chunk number, the maximum size chunks are read in and the total size of the download
1417-
(-1 if unknown). It will be called once at the start and after each chunk of data is read from the
1418-
network. *reporthook* is ignored for local URLs.
1407+
Retrieves the contents of *url* and places it in *filename*. The return value
1408+
is a tuple consisting of a local filename and either an
1409+
:class:`email.message.Message` object containing the response headers (for remote
1410+
URLs) or ``None`` (for local URLs). The caller must then open and read the
1411+
contents of *filename*. If *filename* is not given and the URL refers to a
1412+
local file, the input filename is returned. If the URL is non-local and
1413+
*filename* is not given, the filename is the output of :func:`tempfile.mktemp`
1414+
with a suffix that matches the suffix of the last path component of the input
1415+
URL. If *reporthook* is given, it must be a function accepting three numeric
1416+
parameters: A chunk number, the maximum size chunks are read in and the total size of the download
1417+
(-1 if unknown). It will be called once at the start and after each chunk of data is read from the
1418+
network. *reporthook* is ignored for local URLs.
14191419

1420-
If the *url* uses the :file:`http:` scheme identifier, the optional *data*
1421-
argument may be given to specify a ``POST`` request (normally the request type
1422-
is ``GET``). The *data* argument must in standard
1423-
:mimetype:`application/x-www-form-urlencoded` format; see the
1424-
:func:`urllib.parse.urlencode` function.
1420+
If the *url* uses the :file:`http:` scheme identifier, the optional *data*
1421+
argument may be given to specify a ``POST`` request (normally the request type
1422+
is ``GET``). The *data* argument must in standard
1423+
:mimetype:`application/x-www-form-urlencoded` format; see the
1424+
:func:`urllib.parse.urlencode` function.
14251425

14261426

1427-
.. attribute:: version
1427+
.. attribute:: version
14281428

1429-
Variable that specifies the user agent of the opener object. To get
1430-
:mod:`urllib` to tell servers that it is a particular user agent, set this in a
1431-
subclass as a class variable or in the constructor before calling the base
1432-
constructor.
1429+
Variable that specifies the user agent of the opener object. To get
1430+
:mod:`urllib` to tell servers that it is a particular user agent, set this in a
1431+
subclass as a class variable or in the constructor before calling the base
1432+
constructor.
14331433

14341434

14351435
.. class:: FancyURLopener(...)

0 commit comments

Comments
 (0)