]> granicus.if.org Git - python/commitdiff
docs: Mention PEP 479 in whatsnew.
authorYury Selivanov <yselivanov@sprymix.com>
Fri, 22 May 2015 15:30:45 +0000 (11:30 -0400)
committerYury Selivanov <yselivanov@sprymix.com>
Fri, 22 May 2015 15:30:45 +0000 (11:30 -0400)
Issue 22906.

Doc/whatsnew/3.5.rst

index b9ea6278a6eda7f49508ec24a9bb47e800058e3c..b2571ae45e0fd0bfb4bd4850443f26fb9da87ce8 100644 (file)
@@ -209,6 +209,27 @@ against asynchronous signal reception.
    :pep:`475` -- Retry system calls failing with EINTR
 
 
+PEP 479: Change StopIteration handling inside generators
+--------------------------------------------------------
+
+:pep:`479` changes the behavior of generators: when a :exc:`StopIteration`
+exception is raised inside a generator, it is replaced with a
+:exc:`RuntimeError`.  To enable the feature a ``__future__`` import should
+be used::
+
+    from __future__ import generator_stop
+
+Without a ``__future__`` import, a :exc:`PendingDeprecationWarning` will be
+raised.
+
+PEP written by Chris Angelico and Guido van Rossum. Implemented by
+Chris Angelico, Yury Selivanov and Nick Coghlan.
+
+.. seealso::
+
+   :pep:`479` -- Change StopIteration handling inside generators
+
+
 PEP 486: Make the Python Launcher aware of virtual environments
 ---------------------------------------------------------------