[Python-checkins] CVS: python/dist/src/Python future.c,2.5,2.6

Guido van Rossum gvanrossum@users.sourceforge.net
Sun, 15 Jul 2001 14:08:31 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv12021/Python

Modified Files:
	future.c 
Log Message:
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.


Index: future.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/future.c,v
retrieving revision 2.5
retrieving revision 2.6
diff -C2 -r2.5 -r2.6
*** future.c	2001/03/10 02:15:37	2.5
--- future.c	2001/07/15 21:08:29	2.6
***************
*** 32,35 ****
--- 32,37 ----
  		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,