diff options
author | Guido van Rossum <guido@python.org> | 2001-07-16 16:53:08 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-07-16 16:53:08 (GMT) |
commit | e16c7aee4bc2a8851b9a9bae60a00c2544722f67 (patch) | |
tree | 79bd88b5428d2efe84726eb85e6e19465bcb2621 /Python | |
parent | a1b3a4740662c5815c29a694e89de2171406b253 (diff) | |
download | cpython-e16c7aee4bc2a8851b9a9bae60a00c2544722f67.zip cpython-e16c7aee4bc2a8851b9a9bae60a00c2544722f67.tar.gz cpython-e16c7aee4bc2a8851b9a9bae60a00c2544722f67.tar.bz2 |
jcompile(): inherit the CO_GENERATOR_ALLOWED flag from the 'base'
compiling struct.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/compile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index e950f0f..ad616f2 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -3945,6 +3945,7 @@ jcompile(node *n, char *filename, struct compiling *base, 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); |