From 4727a10222f587670af53e629b258592b913223b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 15 Jul 2001 21:08:29 +0000 Subject: 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. --- Python/future.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/future.c') diff --git a/Python/future.c b/Python/future.c index cf2dca5ea5..70be26b548 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"); -- cgit v1.2.1