Update pep-478 and pep-479.

This commit is contained in:
Yury Selivanov 2015-05-09 11:48:43 -04:00
parent 62971a8dd0
commit ff8f094454
2 changed files with 5 additions and 4 deletions

View File

@ -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:

View File

@ -3,7 +3,7 @@ Title: Change StopIteration handling inside generators
Version: $Revision$
Last-Modified: $Date$
Author: Chris Angelico <rosuav@gmail.com>, Guido van Rossum <guido@python.org>
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)