We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff3fca1 commit 65677e6Copy full SHA for 65677e6
1 file changed
Doc/library/urllib.parse.rst
@@ -593,8 +593,9 @@ task isn't already covered by the URL parsing functions above.
593
594
The optional *encoding* and *errors* parameters specify how to deal with
595
non-ASCII characters, as accepted by the :meth:`str.encode` method.
596
- *encoding* defaults to ``'utf-8'``.
597
- *errors* defaults to ``'strict'``, meaning unsupported characters raise a
+ Although these parameters default to ``None`` in the function signature,
+ when processing :class:`str` inputs, *encoding* effectively defaults to ``'utf-8'``
598
+ and *errors* to ``'strict'``, meaning unsupported characters raise a
599
:class:`UnicodeEncodeError`.
600
*encoding* and *errors* must not be supplied if *string* is a
601
:class:`bytes`, or a :class:`TypeError` is raised.
0 commit comments