diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-06-02 02:19:15 +0000 |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-06-02 02:19:15 +0000 |
commit | 98bc31f5e0642e88eecd8237ea71be5e60e36dcd (patch) | |
tree | ffc0d3f3fc14c19f9a5d47258449eade6d876bed | |
parent | Fix #8618. Ask the Windows mixer API if there are any playback devices (diff) | |
download | cpython-98bc31f5e0642e88eecd8237ea71be5e60e36dcd.tar.gz cpython-98bc31f5e0642e88eecd8237ea71be5e60e36dcd.tar.bz2 cpython-98bc31f5e0642e88eecd8237ea71be5e60e36dcd.zip |
Fix issue8788 - description of doseq parameter in urllib.urlencode
-rw-r--r-- | Doc/library/urllib.rst | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst index b48973bbfd6..9666819e4eb 100644 --- a/Doc/library/urllib.rst +++ b/Doc/library/urllib.rst @@ -236,17 +236,19 @@ Utility functions .. function:: urlencode(query[, doseq]) - 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. The :mod:`urlparse` module provides the functions + 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. The :mod:`urlparse` module provides the functions :func:`parse_qs` and :func:`parse_qsl` which are used to parse query strings into Python data structures. |