summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-07-22 01:47:30 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-07-22 01:47:30 (GMT)
commit880685f69894d3d267ac41abe0c06db3ba9a322d (patch)
treea9d0b2de88cb208a40d98e88faad37cf783c1a77 /Doc/library
parent7a7013e8304a5e54782330fe91e96e510d63e72e (diff)
downloadcpython-880685f69894d3d267ac41abe0c06db3ba9a322d.zip
cpython-880685f69894d3d267ac41abe0c06db3ba9a322d.tar.gz
cpython-880685f69894d3d267ac41abe0c06db3ba9a322d.tar.bz2
Reverting the checkin made in revision 82940, as it was adding new parameters to quote function in a bugfix release.
Discussed in issue1712522
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/urllib.rst22
1 files changed, 3 insertions, 19 deletions
diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst
index 7b4d0bf..5621f51 100644
--- a/Doc/library/urllib.rst
+++ b/Doc/library/urllib.rst
@@ -202,40 +202,24 @@ High-level interface
Utility functions
-----------------
-.. function:: quote(string[, safe[, encoding[, errors]]])
+.. function:: quote(string[, safe])
Replace special characters in *string* using the ``%xx`` escape. Letters,
digits, and the characters ``'_.-'`` are never quoted. By default, this
- function is intended for quoting the path section of the URL. The optional
+ function is intended for quoting the path section of the URL.The optional
*safe* parameter specifies additional characters that should not be quoted
--- its default value is ``'/'``.
- *string* may be either a :class:`str` or a :class:`unicode`.
-
- The optional *encoding* and *errors* parameters specify how to deal with
- non-ASCII characters, as accepted by the :meth:`unicode.encode` method.
- *encoding* defaults to ``'utf-8'``.
- *errors* defaults to ``'strict'``, meaning unsupported characters raise a
- :class:`UnicodeEncodeError`.
- Non-Unicode strings are not encoded by default, and all bytes are allowed.
-
Example: ``quote('/~connolly/')`` yields ``'/%7econnolly/'``.
- Example: ``quote(u'/El Niño/')`` yields ``'/El%20Ni%C3%B1o/'``.
-
- .. versionchanged:: 2.7.1
- Added *encoding* and *errors* parameters.
-
-.. function:: quote_plus(string[, safe[, encoding[, errors]]])
+.. function:: quote_plus(string[, safe])
Like :func:`quote`, but also replaces spaces by plus signs, as required for
quoting HTML form values when building up a query string to go into a URL.
Plus signs in the original string are escaped unless they are included in
*safe*. It also does not have *safe* default to ``'/'``.
- Example: ``quote_plus(u'/El Niño/')`` yields ``'%2FEl+Ni%C3%B1o%2F'``.
-
.. function:: unquote(string)