aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-09 11:44:30 -0400
committerYury Selivanov <yselivanov@sprymix.com>2015-05-09 11:44:30 -0400
commit8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26 (patch)
treed6353155110b49bf7953fd0d7d3f808512e8feb1 /Python/future.c
parentIssue #24018: Add a collections.Generator abstract base class. (diff)
downloadcpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.tar.gz
cpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.tar.bz2
cpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.zip
PEP 479: Change StopIteration handling inside generators.
Closes issue #22906.
Diffstat (limited to 'Python/future.c')
-rw-r--r--Python/future.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/future.c b/Python/future.c
index 81eab54dd62..163f87f673d 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -40,6 +40,8 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, PyObject *filename)
continue;
} else if (strcmp(feature, FUTURE_BARRY_AS_BDFL) == 0) {
ff->ff_features |= CO_FUTURE_BARRY_AS_BDFL;
+ } else if (strcmp(feature, FUTURE_GENERATOR_STOP) == 0) {
+ ff->ff_features |= CO_FUTURE_GENERATOR_STOP;
} else if (strcmp(feature, "braces") == 0) {
PyErr_SetString(PyExc_SyntaxError,
"not a chance");