[Python-checkins] cpython: docs: Mention PEP 479 in whatsnew.

yury.selivanov python-checkins at python.org
Fri May 22 17:30:50 CEST 2015


https://hg.python.org/cpython/rev/c8a3e49f35e7
changeset:   96207:c8a3e49f35e7
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Fri May 22 11:30:45 2015 -0400
summary:
  docs: Mention PEP 479 in whatsnew.

Issue 22906.

files:
  Doc/whatsnew/3.5.rst |  21 +++++++++++++++++++++
  1 files changed, 21 insertions(+), 0 deletions(-)


diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -209,6 +209,27 @@
    :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
 ---------------------------------------------------------------
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list