Skip to content

Commit

Permalink
feature to version check for context dict methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed May 20, 2013
1 parent 146c9ba commit ff0b5f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jinja2/runtime.py
Expand Up @@ -15,7 +15,7 @@
from jinja2.exceptions import UndefinedError, TemplateRuntimeError, \
TemplateNotFound
from jinja2._compat import next, imap, text_type, iteritems, \
implements_iterator, implements_to_string, string_types
implements_iterator, implements_to_string, string_types, PY2


# these variables are exported to the template runtime
Expand Down Expand Up @@ -216,7 +216,7 @@ def _all(meth):
items = _all('items')

# not available on python 3
if hasattr(dict, 'iterkeys'):
if PY2:
iterkeys = _all('iterkeys')
itervalues = _all('itervalues')
iteritems = _all('iteritems')
Expand Down

0 comments on commit ff0b5f5

Please sign in to comment.