Mercurial > repos > bcclaywell > argo_navis
comparison venv/lib/python2.7/site-packages/markupsafe/_compat.py @ 0:d67268158946 draft
planemo upload commit a3f181f5f126803c654b3a66dd4e83a48f7e203b
author | bcclaywell |
---|---|
date | Mon, 12 Oct 2015 17:43:33 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d67268158946 |
---|---|
1 # -*- coding: utf-8 -*- | |
2 """ | |
3 markupsafe._compat | |
4 ~~~~~~~~~~~~~~~~~~ | |
5 | |
6 Compatibility module for different Python versions. | |
7 | |
8 :copyright: (c) 2013 by Armin Ronacher. | |
9 :license: BSD, see LICENSE for more details. | |
10 """ | |
11 import sys | |
12 | |
13 PY2 = sys.version_info[0] == 2 | |
14 | |
15 if not PY2: | |
16 text_type = str | |
17 string_types = (str,) | |
18 unichr = chr | |
19 int_types = (int,) | |
20 iteritems = lambda x: iter(x.items()) | |
21 else: | |
22 text_type = unicode | |
23 string_types = (str, unicode) | |
24 unichr = unichr | |
25 int_types = (int, long) | |
26 iteritems = lambda x: x.iteritems() |