| Thomas Waldmann | a2cf1d3 | 2013-05-18 13:08:53 +0200 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | """ |
| 3 | jinja2._compat |
| 4 | ~~~~~~~~~~~~~~ |
| 5 | |
| Thomas Waldmann | 05ace8b | 2013-05-18 13:14:14 +0200 | [diff] [blame^] | 6 | Some py2/py3 compatibility support that is not yet available in |
| 7 | "six" 1.3.0. |
| Thomas Waldmann | a2cf1d3 | 2013-05-18 13:08:53 +0200 | [diff] [blame] | 8 | There are bugs open for "six" for all this stuff, so we can remove it |
| 9 | again from here as soon as we require a new enough "six" release. |
| 10 | |
| 11 | :copyright: Copyright 2013 by the Jinja team, see AUTHORS. |
| 12 | :license: BSD, see LICENSE for details. |
| 13 | """ |
| 14 | |
| 15 | # https://bitbucket.org/gutworth/six/issue/25/add-unichr |
| 16 | try: |
| 17 | unichr = unichr # py2 |
| 18 | except NameError: |
| 19 | unichr = chr # py3 |