Skip to content

Commit

Permalink
Fix typos in library/email.policy.rst
Browse files Browse the repository at this point in the history
Fixed `Defect` to `MessageDefect` since the class `Defect` does not exist.
  • Loading branch information
koyuki7w committed Jan 4, 2025
1 parent f157485 commit f9294c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Doc/library/email.policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ added matters. To illustrate::

Handle a *defect* found on *obj*. When the email package calls this
method, *defect* will always be a subclass of
:class:`~email.errors.Defect`.
:class:`~email.errors.MessageDefect`.

The default implementation checks the :attr:`raise_on_defect` flag. If
it is ``True``, *defect* is raised as an exception. If it is ``False``
Expand All @@ -277,7 +277,7 @@ added matters. To illustrate::
.. method:: register_defect(obj, defect)

Register a *defect* on *obj*. In the email package, *defect* will always
be a subclass of :class:`~email.errors.Defect`.
be a subclass of :class:`~email.errors.MessageDefect`.

The default implementation calls the ``append`` method of the ``defects``
attribute of *obj*. When the email package calls :attr:`handle_defect`,
Expand Down

0 comments on commit f9294c7

Please sign in to comment.