Skip to content

Commit

Permalink
document StopAsyncIteration.value attribute in exceptions.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-dixon committed Oct 13, 2024
1 parent fcabdea commit b3c03fa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Doc/library/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,18 @@ The following exceptions are the exceptions that are usually raised.
Must be raised by :meth:`~object.__anext__` method of an
:term:`asynchronous iterator` object to stop the iteration.

.. attribute:: StopAsyncIteration.value

The exception object has a single attribute :attr:`!value`, which is
given as an argument when constructing the exception, and defaults
to :const:`None`.

.. versionadded:: 3.5

.. versionchanged:: 3.14
Added ``value`` attribute and the ability for async generator functions to
use it to return a value.

.. exception:: SyntaxError(message, details)

Raised when the parser encounters a syntax error. This may occur in an
Expand Down

0 comments on commit b3c03fa

Please sign in to comment.