]> granicus.if.org Git - python/commitdiff
Merge __next__ method link fixes with 3.2.
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 12 Oct 2012 10:45:38 +0000 (13:45 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 12 Oct 2012 10:45:38 +0000 (13:45 +0300)
1  2 
Doc/glossary.rst
Doc/library/concurrent.futures.rst
Doc/library/dis.rst
Doc/library/exceptions.rst
Doc/library/functions.rst
Doc/library/stdtypes.rst
Doc/reference/datamodel.rst
Doc/reference/expressions.rst
Doc/tutorial/classes.rst
Doc/whatsnew/3.0.rst

Simple merge
Simple merge
Simple merge
index 6ba58d46d50d6cc5a7891e35288b6c16685070e2,7d622c2fe953e92693b737cd5c7c97d1e449dbf3..ac0221570d9fa060c2fd136806d3aa324d7d32ec
@@@ -275,20 -262,8 +275,20 @@@ The following exceptions are the except
  .. exception:: StopIteration
  
     Raised by built-in function :func:`next` and an :term:`iterator`\'s
-    :meth:`__next__` method to signal that there are no further items to be
-    produced by the iterator.
 -   :meth:`~iterator.__next__` method to signal that there are no further values.
++   :meth:`~iterator.__next__` method to signal that there are no further
++   items produced by the iterator.
  
 +   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 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.
 +
 +   .. versionchanged:: 3.3
 +      Added ``value`` attribute and the ability for generator functions to
 +      use it to return a value.
  
  .. exception:: SyntaxError
  
index 0e836f9d0755efb74138f9011375fa35d15cdd1e,572706a68cd1ab33f9a601382d8d5057910bb8ef..f7826553942a07240c0de65cdb58a1bec2d0a01a
@@@ -687,12 -681,11 +687,13 @@@ are always available.  They are listed 
     starting at ``0``).  If it does not support either of those protocols,
     :exc:`TypeError` is raised. If the second argument, *sentinel*, is given,
     then *object* must be a callable object.  The iterator created in this case
-    will call *object* with no arguments for each call to its :meth:`__next__`
-    method; if the value returned is equal to *sentinel*, :exc:`StopIteration`
-    will be raised, otherwise the value will be returned.
+    will call *object* with no arguments for each call to its
+    :meth:`~iterator.__next__` method; if the value returned is equal to
+    *sentinel*, :exc:`StopIteration` will be raised, otherwise the value will
+    be returned.
  
 +   See also :ref:`typeiter`.
 +
     One useful application of the second form of :func:`iter` is to read lines of
     a file until a certain line is reached.  The following example reads a file
     until the :meth:`readline` method returns an empty string::
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge