Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Doc/library/urllib.parse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,9 @@ task isn't already covered by the URL parsing functions above.

The optional *encoding* and *errors* parameters specify how to deal with
non-ASCII characters, as accepted by the :meth:`str.encode` method.
*encoding* defaults to ``'utf-8'``.
*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'``
and *errors* to ``'strict'``, meaning unsupported characters raise a
:class:`UnicodeEncodeError`.
*encoding* and *errors* must not be supplied if *string* is a
:class:`bytes`, or a :class:`TypeError` is raised.
Expand Down
Loading