From: Robert Bradshaw Date: Sat, 7 Mar 2009 21:05:11 +0000 (-0800) Subject: Enable @locals for methods (ctx is c_class_pxd, not class_pxd) X-Git-Tag: 0.11.rc~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b7924e30b901ea7a0b7f3ecf89fbe9160fc103f;p=cython.git Enable @locals for methods (ctx is c_class_pxd, not class_pxd) --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 7b4dc986..2ec67e41 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -1491,7 +1491,8 @@ def p_statement(s, ctx, first_statement = 0): elif s.sy == 'IF': return p_IF_statement(s, ctx) elif s.sy == 'DECORATOR': - if ctx.level not in ('module', 'class', 'c_class', 'property', 'module_pxd', 'class_pxd'): + if ctx.level not in ('module', 'class', 'c_class', 'property', 'module_pxd', 'c_class_pxd'): + print ctx.level s.error('decorator not allowed here') s.level = ctx.level decorators = p_decorators(s)