Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Unified Diff: Doc/library/exceptions.rst

Issue 11682: PEP 380 reference implementation for 3.3
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Doc/reference/expressions.rst » ('j') | Doc/reference/expressions.rst » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -262,8 +262,15 @@
.. exception:: StopIteration
Raised by built-in function :func:`next` and an :term:`iterator`\'s
- :meth:`__next__` method to signal that there are no further values.
+ :obj:`~iterator.__next__` method to signal that there are no
+ further items in the sequence.
eric.araujo 2011/09/21 16:25:47 Please use “elements”; the doc is very careful to
+ The exception object has a single attribute :attr:`value`, which is
+ given as an argument when constructing the exception, and defaults
+ to :const:`None`. When a generator function returns, a
eric.araujo 2011/09/21 16:25:47 Should be ``None``.
+ :exc:`StopIteration` is raised, and the value returned by the
+ function is used as the :attr:`value` parameter to the constructor
+ of the exception.
.. exception:: SyntaxError
« no previous file with comments | « no previous file | Doc/reference/expressions.rst » ('j') | Doc/reference/expressions.rst » ('J')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+