summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorStein Karlsen <karlsen.stein@gmail.com>2019-10-14 10:36:29 (GMT)
committerTal Einat <taleinat+github@gmail.com>2019-10-14 10:36:29 (GMT)
commitaad2ee01561f260c69af1951c0d6fcaf75c4d41b (patch)
tree6ffb53582b94065c4eb04012aaffa49a1af5422f /Doc
parent9cb51f4e20033f5fd4fed46036e347f263bb6d5b (diff)
downloadcpython-aad2ee01561f260c69af1951c0d6fcaf75c4d41b.zip
cpython-aad2ee01561f260c69af1951c0d6fcaf75c4d41b.tar.gz
cpython-aad2ee01561f260c69af1951c0d6fcaf75c4d41b.tar.bz2
bpo-32498: urllib.parse.unquote also accepts bytes (GH-7768)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/urllib.parse.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index 49276da..84d289b 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -571,7 +571,7 @@ task isn't already covered by the URL parsing functions above.
percent-encoded sequences into Unicode characters, as accepted by the
:meth:`bytes.decode` method.
- *string* must be a :class:`str`.
+ *string* may be either a :class:`str` or a :class:`bytes`.
*encoding* defaults to ``'utf-8'``.
*errors* defaults to ``'replace'``, meaning invalid sequences are replaced
@@ -579,6 +579,11 @@ task isn't already covered by the URL parsing functions above.
Example: ``unquote('/El%20Ni%C3%B1o/')`` yields ``'/El NiƱo/'``.
+ .. versionchanged:: 3.9
+ *string* parameter supports bytes and str objects (previously only str).
+
+
+
.. function:: unquote_plus(string, encoding='utf-8', errors='replace')