From d7d6fd3df2e85549d4b84ad6031835d5ac625945 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 3 Nov 2010 10:45:48 +0100 Subject: [PATCH] disable 'with template' syntax in Python files --- Cython/Compiler/Parsing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 12412942..10cc16cd 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -1504,7 +1504,7 @@ def p_include_statement(s, ctx): def p_with_statement(s): s.next() # 'with' - if s.systring == 'template': + if s.systring == 'template' and not s.in_python_file: node = p_with_template(s) else: node = p_with_items(s) -- 2.26.2