diff Python/compile.c @ 18631:4030c9019067 legacy-trunk

jcompile(): inherit the CO_GENERATOR_ALLOWED flag from the 'base' compiling struct.
author Guido van Rossum <guido@python.org>
date Mon, 16 Jul 2001 16:53:08 +0000
parents fdb36a0c7e6e
children 821e35706c07
line wrap: on
line diff
--- a/Python/compile.c	Mon Jul 16 16:51:33 2001 +0000
+++ b/Python/compile.c	Mon Jul 16 16:53:08 2001 +0000
@@ -3945,6 +3945,7 @@
 		if (base->c_nested 
 		    || (sc.c_symtable->st_cur->ste_type == TYPE_FUNCTION))
 			sc.c_nested = 1;
+		sc.c_flags |= base->c_flags & CO_GENERATOR_ALLOWED;
 	} else {
 		sc.c_private = NULL;
 		sc.c_future = PyNode_Future(n, filename);