blob: 8c1963c497cf46913b77482fefbf3cdcdf0a015e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# -*- coding: utf-8 -*-
"""
jinja2._compat
~~~~~~~~~~~~~~
Some py2/py3 compatibility support that is not yet available in
"six" 1.3.0. Generally all uses of six should go through this module
so that we have one central place to remove stuff from when we
eventually drop 2.x.
:copyright: Copyright 2013 by the Jinja team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import six
# https://bitbucket.org/gutworth/six/issue/25/add-unichr
try:
unichr = unichr # py2
except NameError:
unichr = chr # py3
range_type = six.moves.xrange
next = six.advance_iterator
imap = six.moves.map
|