]> granicus.if.org Git - python/commitdiff
Add versionchanged notes for PEP 380
authorNick Coghlan <ncoghlan@gmail.com>
Sat, 14 Jan 2012 04:43:24 +0000 (14:43 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Sat, 14 Jan 2012 04:43:24 +0000 (14:43 +1000)
Doc/library/exceptions.rst
Doc/reference/expressions.rst
Doc/reference/simple_stmts.rst

index a9a16d3d9a5c598c1743f32b9dd5d0faadd7c1d6..3f1a30da7c14ec920e7176b85f8a95d325604397 100644 (file)
@@ -261,6 +261,9 @@ The following exceptions are the exceptions that are usually raised.
    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 7da54a2ddf2cccd05a888a72828afe69ac6d769a..97461627bfd0343771ed259e522c0e228cedf59d 100644 (file)
@@ -355,7 +355,7 @@ resumed before it is finalized (by reaching a zero reference count or by being
 garbage collected), the generator-iterator's :meth:`close` method will be
 called, allowing any pending :keyword:`finally` clauses to execute.
 
-When ``yield from expression`` is used, it treats the supplied expression as
+When ``yield from <expr>`` is used, it treats the supplied expression as
 a subiterator. All values produced by that subiterator are passed directly
 to the caller of the current generator's methods. Any values passed in with
 :meth:`send` and any exceptions passed in with :meth:`throw` are passed to
@@ -369,6 +369,9 @@ the yield expression. It can be either set explicitly when raising
 :exc:`StopIteration`, or automatically when the sub-iterator is a generator
 (by returning a value from the sub-generator).
 
+   .. versionchanged:: 3.3
+      Added ``yield from <expr>`` to delegate control flow to a subiterator
+
 The parentheses can be omitted when the :keyword:`yield` expression is the
 sole expression on the right hand side of an assignment statement.
 
index d98b829c97d7212e2ee48dfd339dc650bf6136da..3bd08942c01b6b67ff447e941fb718a01ed5e815 100644 (file)
@@ -470,10 +470,13 @@ resumed before it is finalized (by reaching a zero reference count or by being
 garbage collected), the generator-iterator's :meth:`close` method will be
 called, allowing any pending :keyword:`finally` clauses to execute.
 
-When ``yield from expression`` is used, it treats the supplied expression as
+When ``yield from <expr>`` is used, it treats the supplied expression as
 a subiterator, producing values from it until the underlying iterator is
 exhausted.
 
+   .. versionchanged:: 3.3
+      Added ``yield from <expr>`` to delegate control flow to a subiterator
+
 For full details of :keyword:`yield` semantics, refer to the :ref:`yieldexpr`
 section.