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 6d38668 commit bc9bb73Copy full SHA for bc9bb73
1 file changed
Doc/library/urllib.parse.rst
@@ -649,8 +649,9 @@ task isn't already covered by the URL parsing functions above.
649
650
The optional *encoding* and *errors* parameters specify how to deal with
651
non-ASCII characters, as accepted by the :meth:`str.encode` method.
652
- *encoding* defaults to ``'utf-8'``.
653
- *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'``
654
+ and *errors* to ``'strict'``, meaning unsupported characters raise a
655
:class:`UnicodeEncodeError`.
656
*encoding* and *errors* must not be supplied if *string* is a
657
:class:`bytes`, or a :class:`TypeError` is raised.
0 commit comments