diff options
author | Guido van Rossum <guido@python.org> | 2001-07-15 21:08:29 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-07-15 21:08:29 (GMT) |
commit | b09f7ed6235783fca27a4f8730c4c33e0f53c16c (patch) | |
tree | d76806c53fd83557378dcd7395ce5309f707eb15 /Python/future.c | |
parent | 045ca7ae72368ce65fe7debbd343cf8133eea5e4 (diff) | |
download | cpython-b09f7ed6235783fca27a4f8730c4c33e0f53c16c.zip cpython-b09f7ed6235783fca27a4f8730c4c33e0f53c16c.tar.gz cpython-b09f7ed6235783fca27a4f8730c4c33e0f53c16c.tar.bz2 |
Preliminary support for "from __future__ import generators" to enable
the yield statement. I figure we have to have this in before I can
release 2.2a1 on Wednesday.
Note: test_generators is currently broken, I'm counting on Tim to fix
this.
Diffstat (limited to 'Python/future.c')
-rw-r--r-- | Python/future.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/future.c b/Python/future.c index cf2dca5..70be26b 100644 --- a/Python/future.c +++ b/Python/future.c @@ -31,6 +31,8 @@ future_check_features(PyFutureFeatures *ff, node *n, char *filename) feature = STR(CHILD(ch, 0)); if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) { ff->ff_nested_scopes = 1; + } else if (strcmp(feature, FUTURE_GENERATORS) == 0) { + /* OK; this is processed by the parser */ } else if (strcmp(feature, "braces") == 0) { PyErr_SetString(PyExc_SyntaxError, "not a chance"); |