From c4be314b10c1472b9c9683af9973960828926915 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 4 Mar 2007 21:03:50 +0100 Subject: [PATCH] [svn] added xrange as default builtin --HG-- branch : trunk --- jinja/defaults.py | 2 +- jinja/environment.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jinja/defaults.py b/jinja/defaults.py index d5d0b86..454370b 100644 --- a/jinja/defaults.py +++ b/jinja/defaults.py @@ -12,6 +12,6 @@ from jinja.filters import FILTERS as DEFAULT_FILTERS from jinja.tests import TESTS as DEFAULT_TESTS -#: for global objects in later jinja releases. (add stuff like debug()) DEFAULT_NAMESPACE = { + 'range': xrange } diff --git a/jinja/environment.py b/jinja/environment.py index 3311c8d..5c478f1 100644 --- a/jinja/environment.py +++ b/jinja/environment.py @@ -60,7 +60,7 @@ class Environment(object): # global namespace self.globals = namespace is None and DEFAULT_NAMESPACE.copy() \ - or namespace or {} + or namespace # create lexer self.lexer = Lexer(self) -- 2.26.2