summaryrefslogtreecommitdiffstats
path: root/Doc/library/urllib.parse.rst
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-06-02 02:31:04 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-06-02 02:31:04 (GMT)
commitaa47f0ead8a88e66f774e56623d17dc55146197e (patch)
tree4e9a8a5a51d66b48eb354668c813262a9fcd8493 /Doc/library/urllib.parse.rst
parentf879c7911f73604aa95f4f041ba2107b23fcc534 (diff)
downloadcpython-aa47f0ead8a88e66f774e56623d17dc55146197e.zip
cpython-aa47f0ead8a88e66f774e56623d17dc55146197e.tar.gz
cpython-aa47f0ead8a88e66f774e56623d17dc55146197e.tar.bz2
Merged revisions 81647 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r81647 | senthil.kumaran | 2010-06-02 07:59:00 +0530 (Wed, 02 Jun 2010) | 9 lines Merged revisions 81645 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81645 | senthil.kumaran | 2010-06-02 07:49:15 +0530 (Wed, 02 Jun 2010) | 3 lines Fix issue8788 - description of doseq parameter in urllib.urlencode ........ ................
Diffstat (limited to 'Doc/library/urllib.parse.rst')
-rw-r--r--Doc/library/urllib.parse.rst28
1 files changed, 15 insertions, 13 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index 483e340..d9776be 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -309,19 +309,21 @@ The :mod:`urllib.parse` module defines the following functions:
.. function:: urlencode(query, doseq=False)
- Convert a mapping object or a sequence of two-element tuples to a "url-encoded"
- string, suitable to pass to :func:`urlopen` above as the optional *data*
- argument. This is useful to pass a dictionary of form fields to a ``POST``
- request. The resulting string is a series of ``key=value`` pairs separated by
- ``'&'`` characters, where both *key* and *value* are quoted using
- :func:`quote_plus` above. If the optional parameter *doseq* is present and
- evaluates to true, individual ``key=value`` pairs are generated for each element
- of the sequence. When a sequence of two-element tuples is used as the *query*
- argument, the first element of each tuple is a key and the second is a value.
- The order of parameters in the encoded string will match the order of parameter
- tuples in the sequence. This module provides the functions
- :func:`parse_qs` and :func:`parse_qsl` which are used to parse query strings
- into Python data structures.
+ Convert a mapping object or a sequence of two-element tuples to a
+ "url-encoded" string, suitable to pass to :func:`urlopen` above as the
+ optional *data* argument. This is useful to pass a dictionary of form
+ fields to a ``POST`` request. The resulting string is a series of
+ ``key=value`` pairs separated by ``'&'`` characters, where both *key* and
+ *value* are quoted using :func:`quote_plus` above. When a sequence of
+ two-element tuples is used as the *query* argument, the first element of
+ each tuple is a key and the second is a value. The value element in itself
+ can be a sequence and in that case, if the optional parameter *doseq* is
+ evaluates to *True*, individual ``key=value`` pairs separated by ``'&'``are
+ generated for each element of the value sequence for the key. The order of
+ parameters in the encoded string will match the order of parameter tuples in
+ the sequence. This module provides the functions :func:`parse_qs` and
+ :func:`parse_qsl` which are used to parse query strings into Python data
+ structures.
.. seealso::