diff options
Diffstat (limited to 'Doc/library/urllib.parse.rst')
-rw-r--r-- | Doc/library/urllib.parse.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index aece714..b33e8fe 100644 --- a/Doc/library/urllib.parse.rst +++ b/Doc/library/urllib.parse.rst @@ -512,9 +512,10 @@ task isn't already covered by the URL parsing functions above. Convert a mapping object or a sequence of two-element tuples, which may either be a :class:`str` or a :class:`bytes`, to a "percent-encoded" - string. The resultant string must be converted to bytes using the - user-specified encoding before it is sent to :func:`urlopen` as the optional - *data* argument. + string. If the resultant string is to be used as a *data* for POST + operation with :func:`urlopen` function, then it should be properly encoded + to bytes, otherwise it would result in a :exc:`TypeError`. + 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* |