From ff8f0944547710e4cc7ae7d3aa20424c40540bc2 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Sat, 9 May 2015 11:48:43 -0400 Subject: [PATCH] Update pep-478 and pep-479. --- pep-0478.txt | 1 + pep-0479.txt | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pep-0478.txt b/pep-0478.txt index 63a3a50e2..7c3043bab 100644 --- a/pep-0478.txt +++ b/pep-0478.txt @@ -60,6 +60,7 @@ Implemented / Final PEPs: * PEP 465, a new matrix multiplication operator * PEP 461, %-formatting for binary strings * PEP 471, os.scandir() +* PEP 479, change StopIteration handling inside generators Accepted PEPs: diff --git a/pep-0479.txt b/pep-0479.txt index a0467357a..f00ab0e32 100644 --- a/pep-0479.txt +++ b/pep-0479.txt @@ -3,7 +3,7 @@ Title: Change StopIteration handling inside generators Version: $Revision$ Last-Modified: $Date$ Author: Chris Angelico , Guido van Rossum -Status: Accepted +Status: Final Type: Standards Track Content-Type: text/x-rst Created: 15-Nov-2014 @@ -62,7 +62,7 @@ existent". Unfortunately while intentional use is rare, it is easy to stumble on these cases by accident:: import contextlib - + @contextlib.contextmanager def transaction(): print('begin') @@ -73,7 +73,7 @@ stumble on these cases by accident:: raise else: print('commit') - + def do_it(): print('Refactored initial setup') yield # Body of with-statement is executed here @@ -86,7 +86,7 @@ stumble on these cases by accident:: # return raise StopIteration # This is wrong print('Should not be reached') - + for i in gene(): print('main: i =', i)