From: Stefan Behnel Date: Tue, 15 Sep 2009 06:59:58 +0000 (+0200) Subject: fix merging keyword arguments in compiler directive decorators X-Git-Tag: 0.12.alpha0~201 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e610feedafe4209b18b8c9ac918b285571b6b37b;p=cython.git fix merging keyword arguments in compiler directive decorators --- diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 1637dee2..5dad3786 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -485,8 +485,9 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations): options.reverse() # Decorators coming first take precedence for option in options: name, value = option - if name in optdict: - # assuming it's a dict ... + if name in optdict and isinstance(optdict[name], dict): + # only keywords can be merged, everything else + # overrides completely optdict[name].update(value) else: optdict[name] = value