diff Python/symtable.c @ 32121:302d399cfd37 legacy-trunk

SF patch #872326: Generator expression implementation (Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.
author Raymond Hettinger <python@rcn.com>
date Wed, 19 May 2004 08:20:33 +0000
parents 3aaf24b949df
children 1c4d192f1568
line wrap: on
line diff
--- a/Python/symtable.c	Tue May 18 18:15:03 2004 +0000
+++ b/Python/symtable.c	Wed May 19 08:20:33 2004 +0000
@@ -66,6 +66,8 @@
 	switch (type) {
 	case funcdef:
 	case lambdef:
+	case testlist_gexp: /* generator expression */
+	case argument:      /* generator expression */
 		ste->ste_type = TYPE_FUNCTION;
 		break;
 	case classdef: