[Python-checkins] peps: Update pep-478 and pep-479.
yury.selivanov
python-checkins at python.org
Sat May 9 17:48:46 CEST 2015
https://hg.python.org/peps/rev/cc5a1fe7134d
changeset: 5836:cc5a1fe7134d
user: Yury Selivanov <yselivanov at sprymix.com>
date: Sat May 09 11:48:43 2015 -0400
summary:
Update pep-478 and pep-479.
files:
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
--- a/pep-0478.txt
+++ b/pep-0478.txt
@@ -60,6 +60,7 @@
* 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
--- a/pep-0479.txt
+++ b/pep-0479.txt
@@ -3,7 +3,7 @@
Version: $Revision$
Last-Modified: $Date$
Author: Chris Angelico <rosuav at gmail.com>, Guido van Rossum <guido at python.org>
-Status: Accepted
+Status: Final
Type: Standards Track
Content-Type: text/x-rst
Created: 15-Nov-2014
@@ -62,7 +62,7 @@
stumble on these cases by accident::
import contextlib
-
+
@contextlib.contextmanager
def transaction():
print('begin')
@@ -73,7 +73,7 @@
raise
else:
print('commit')
-
+
def do_it():
print('Refactored initial setup')
yield # Body of with-statement is executed here
@@ -86,7 +86,7 @@
# return
raise StopIteration # This is wrong
print('Should not be reached')
-
+
for i in gene():
print('main: i =', i)
--
Repository URL: https://hg.python.org/peps
More information about the Python-checkins
mailing list