From 34aa7ba11431a46e72ec30ee7528f2e52adbed7f Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Tue, 28 Feb 2006 19:02:24 +0000 Subject: from __future__ import with_statement addon for 'with', mostly written by Neal. --- Python/compile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 78ae6a7f7f..13e0f6d34d 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -4286,6 +4286,8 @@ compute_code_flags(struct compiler *c) flags |= CO_GENERATOR; if (c->c_flags->cf_flags & CO_FUTURE_DIVISION) flags |= CO_FUTURE_DIVISION; + if (c->c_flags->cf_flags & CO_FUTURE_WITH_STATEMENT) + flags |= CO_FUTURE_WITH_STATEMENT; n = PyDict_Size(c->u->u_freevars); if (n < 0) return -1; -- cgit v1.2.1