Skip to content
Myr

[svn] fixed bug in CacheDict for python2.4

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 954153b · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:jinja/utils.py+3 added-3 removed
19 unmodified lines
20from jinja.nodes import Trans21from jinja.datastructure import Context, TemplateData22from jinja.exceptions import SecurityException, TemplateNotFound2324try:24if sys.version_info >= (2, 5):25 from collections import deque26except ImportError:26else:27 deque = None2829#: number of maximal range items30MAX_RANGE = 1000000
384 unmodified lines
415 # use a deque here if possible416 if deque is not None:417 self._queue = deque()418 self._popleft = self._queue.popleft419 # python2.3, just use a list419 # python2.3/2.4, just use a list420 else:421 self._queue = []422 pop = self._queue.pop423 self._popleft = lambda: pop(0)
71 unmodified lines