Skip to content
Merged
Changes from 1 commit
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
12 changes: 9 additions & 3 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1817,9 +1817,15 @@ expression support in the :mod:`re` module).
See :ref:`error-handlers` for details.

For performance reasons, the value of *errors* is not checked for validity
unless an encoding error actually occurs,
:ref:`devmode` is enabled
or a :ref:`debug build <debug-build>` is used.
unless an encoding error actually occurs, :ref:`devmode` is enabled or a :ref:`debug build <debug-build>` is used.
For example::

>>> encoded_str_to_byte = 'Python'.encode()
>>> type(encoded_str_to_byte)
<class 'bytes'>
>>> encoded_str_to_byte
b'Python'


.. versionchanged:: 3.1
Added support for keyword arguments.
Expand Down
Loading