summaryrefslogtreecommitdiffstats
path: root/Doc/library/urllib.parse.rst
diff options
context:
space:
mode:
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>2021-02-15 17:00:20 (GMT)
committerGitHub <noreply@github.com>2021-02-15 17:00:20 (GMT)
commita2f0654b0a5b4c4f726155620002cc1f5f2d206a (patch)
tree52779bb7707f1c778e1f547656307a13020eaeee /Doc/library/urllib.parse.rst
parent4bb2a1ebc569eee6f1b46ecef1965a26ae8cb76d (diff)
downloadcpython-a2f0654b0a5b4c4f726155620002cc1f5f2d206a.zip
cpython-a2f0654b0a5b4c4f726155620002cc1f5f2d206a.tar.gz
cpython-a2f0654b0a5b4c4f726155620002cc1f5f2d206a.tar.bz2
bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536)
Diffstat (limited to 'Doc/library/urllib.parse.rst')
-rw-r--r--Doc/library/urllib.parse.rst18
1 files changed, 12 insertions, 6 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index 1a79078..67c2120 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -190,7 +190,8 @@ or on combining URL components into a URL string.
read. If set, then throws a :exc:`ValueError` if there are more than
*max_num_fields* fields read.
- The optional argument *separator* is the symbol to use for separating the query arguments. It defaults to `&`.
+ The optional argument *separator* is the symbol to use for separating the
+ query arguments. It defaults to ``&``.
Use the :func:`urllib.parse.urlencode` function (with the ``doseq``
parameter set to ``True``) to convert such dictionaries into query
@@ -204,8 +205,10 @@ or on combining URL components into a URL string.
Added *max_num_fields* parameter.
.. versionchanged:: 3.10
- Added *separator* parameter with the default value of `&`. Python versions earlier than Python 3.10 allowed using both ";" and "&" as
- query parameter separator. This has been changed to allow only a single separator key, with "&" as the default separator.
+ Added *separator* parameter with the default value of ``&``. Python
+ versions earlier than Python 3.10 allowed using both ``;`` and ``&`` as
+ query parameter separator. This has been changed to allow only a single
+ separator key, with ``&`` as the default separator.
.. function:: parse_qsl(qs, keep_blank_values=False, strict_parsing=False, encoding='utf-8', errors='replace', max_num_fields=None, separator='&')
@@ -232,7 +235,8 @@ or on combining URL components into a URL string.
read. If set, then throws a :exc:`ValueError` if there are more than
*max_num_fields* fields read.
- The optional argument *separator* is the symbol to use for separating the query arguments. It defaults to `&`.
+ The optional argument *separator* is the symbol to use for separating the
+ query arguments. It defaults to ``&``.
Use the :func:`urllib.parse.urlencode` function to convert such lists of pairs into
query strings.
@@ -244,8 +248,10 @@ or on combining URL components into a URL string.
Added *max_num_fields* parameter.
.. versionchanged:: 3.10
- Added *separator* parameter with the default value of `&`. Python versions earlier than Python 3.10 allowed using both ";" and "&" as
- query parameter separator. This has been changed to allow only a single separator key, with "&" as the default separator.
+ Added *separator* parameter with the default value of ``&``. Python
+ versions earlier than Python 3.10 allowed using both ``;`` and ``&`` as
+ query parameter separator. This has been changed to allow only a single
+ separator key, with ``&`` as the default separator.
.. function:: urlunparse(parts)