summaryrefslogtreecommitdiffstats
path: root/Doc/library/exceptions.rst
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-06-24 15:04:15 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-06-24 15:04:15 (GMT)
commit66f8828bfce4a05cb5e27ed89bba46cdfc64f995 (patch)
tree1ad1dac376e1af397092b1acd5cd0f82732d31d0 /Doc/library/exceptions.rst
parentfcba97242b5ff446849e704926f51ce61355ee0b (diff)
downloadcpython-66f8828bfce4a05cb5e27ed89bba46cdfc64f995.zip
cpython-66f8828bfce4a05cb5e27ed89bba46cdfc64f995.tar.gz
cpython-66f8828bfce4a05cb5e27ed89bba46cdfc64f995.tar.bz2
Issue #24439: Improve PEP 492 related docs.
Patch by Martin Panter.
Diffstat (limited to 'Doc/library/exceptions.rst')
-rw-r--r--Doc/library/exceptions.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 2209f16..1a9d029 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -162,7 +162,8 @@ The following exceptions are the exceptions that are usually raised.
.. exception:: GeneratorExit
- Raised when a :term:`generator`\'s :meth:`close` method is called. It
+ Raised when a :term:`generator` or :term:`coroutine` is closed;
+ see :meth:`generator.close` and :meth:`coroutine.close`. It
directly inherits from :exc:`BaseException` instead of :exc:`Exception` since
it is technically not an error.
@@ -306,7 +307,8 @@ The following exceptions are the exceptions that are usually raised.
given as an argument when constructing the exception, and defaults
to :const:`None`.
- When a generator function returns, a new :exc:`StopIteration` instance is
+ When a :term:`generator` or :term:`coroutine` function
+ returns, a new :exc:`StopIteration` instance is
raised, and the value returned by the function is used as the
:attr:`value` parameter to the constructor of the exception.