diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2013-09-06 04:43:53 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2013-09-06 04:43:53 (GMT) |
commit | d80f7be580bf9f6bcf2c7ae99c6a8afde6aafc6c (patch) | |
tree | 3777a08a180bf2be236d6fcf8c4d8b0be72c5ac7 /Lib/urllib | |
parent | b2372959abba41f268674df48da35e1b9f9d3529 (diff) | |
parent | 324ae385fe225ce31ae3c9aacc4106948c54740e (diff) | |
download | cpython-d80f7be580bf9f6bcf2c7ae99c6a8afde6aafc6c.zip cpython-d80f7be580bf9f6bcf2c7ae99c6a8afde6aafc6c.tar.gz cpython-d80f7be580bf9f6bcf2c7ae99c6a8afde6aafc6c.tar.bz2 |
merge from 3.3
Improve urlencode docstring. Patch by Brian Brazil.
Closes issue #15350
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/parse.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py index b49b7a1..5328b9d 100644 --- a/Lib/urllib/parse.py +++ b/Lib/urllib/parse.py @@ -728,7 +728,7 @@ def quote_from_bytes(bs, safe='/'): return ''.join([quoter(char) for char in bs]) def urlencode(query, doseq=False, safe='', encoding=None, errors=None): - """Encode a sequence of two-element tuples or dictionary into a URL query string. + """Encode a dict or sequence of two-element tuples into a URL query string. If any values in the query arg are sequences and doseq is true, each sequence element is converted to a separate parameter. @@ -737,9 +737,9 @@ def urlencode(query, doseq=False, safe='', encoding=None, errors=None): parameters in the output will match the order of parameters in the input. - The query arg may be either a string or a bytes type. When query arg is a - string, the safe, encoding and error parameters are sent the quote_plus for - encoding. + The components of a query arg may each be either a string or a bytes type. + When a component is a string, the safe, encoding and error parameters are + sent to the quote_plus function for encoding. """ if hasattr(query, "items"): |