[Python-checkins] r81646 - in python/branches/release26-maint: Doc/library/urllib.rst

senthil.kumaran python-checkins at python.org
Wed Jun 2 04:22:00 CEST 2010


Author: senthil.kumaran
Date: Wed Jun  2 04:22:00 2010
New Revision: 81646

Log:
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
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Doc/library/urllib.rst

Modified: python/branches/release26-maint/Doc/library/urllib.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/urllib.rst	(original)
+++ python/branches/release26-maint/Doc/library/urllib.rst	Wed Jun  2 04:22:00 2010
@@ -236,17 +236,19 @@
 
 .. 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.
 


More information about the Python-checkins mailing list