From c580523a47223a7a63f3c8b51a97af3e15513cbe Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 17 Sep 2007 15:33:45 +0200 Subject: [PATCH] context doesn't convert dict subclasses to dicts now --HG-- branch : trunk --- jinja/datastructure.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jinja/datastructure.py b/jinja/datastructure.py index 8f2069d..f4887b3 100644 --- a/jinja/datastructure.py +++ b/jinja/datastructure.py @@ -245,9 +245,12 @@ class Context(BaseContext): def __init__(self, *args, **kwargs): environment = args[0] + if not kwargs and len(args) == 2 and isinstance(args[1], dict): + base = args[1] + else: + base = dict(*args[1:], **kwargs) super(Context, self).__init__(environment.undefined_singleton, - environment.globals, - dict(*args[1:], **kwargs)) + environment.globals, base) self._translate_func = None self.cache = {} self.environment = environment -- 2.26.2