Mercurial > cpython-lru_cache-weakref
diff Python/future.c @ 18609:59446d0f8341 legacy-trunk
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.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sun, 15 Jul 2001 21:08:29 +0000 |
| parents | 7a36f6201c94 |
| children | fdb36a0c7e6e |
line wrap: on
line diff
--- a/Python/future.c Sun Jul 15 19:42:03 2001 +0000 +++ b/Python/future.c Sun Jul 15 21:08:29 2001 +0000 @@ -31,6 +31,8 @@ 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");
