Skip to content
Myr

feature to version check for context dict methods

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

authored by Armin Ronacher · committed by Armin Ronacher · parent 146c9ba · Browse files · 1 file+2 added−2 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+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:jinja2/runtime.py+2 added-2 removed
13 unmodified lines
14 internalcode, object_type_repr15from jinja2.exceptions import UndefinedError, TemplateRuntimeError, \16 TemplateNotFound17from jinja2._compat import next, imap, text_type, iteritems, \18 implements_iterator, implements_to_string, string_types18 implements_iterator, implements_to_string, string_types, PY2192021# these variables are exported to the template runtime22__all__ = ['LoopContext', 'TemplateReference', 'Macro', 'Markup',
192 unmodified lines
215 values = _all('values')216 items = _all('items')217218 # not available on python 3219 if hasattr(dict, 'iterkeys'):219 if PY2:220 iterkeys = _all('iterkeys')221 itervalues = _all('itervalues')222 iteritems = _all('iteritems')223 del _all
346 unmodified lines