comparison env/lib/python3.7/site-packages/markupsafe/_compat.py @ 0:26e78fe6e8c4 draft

"planemo upload commit c699937486c35866861690329de38ec1a5d9f783"
author shellac
date Sat, 02 May 2020 07:14:21 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26e78fe6e8c4
1 # -*- coding: utf-8 -*-
2 """
3 markupsafe._compat
4 ~~~~~~~~~~~~~~~~~~
5
6 :copyright: 2010 Pallets
7 :license: BSD-3-Clause
8 """
9 import sys
10
11 PY2 = sys.version_info[0] == 2
12
13 if not PY2:
14 text_type = str
15 string_types = (str,)
16 unichr = chr
17 int_types = (int,)
18
19 def iteritems(x):
20 return iter(x.items())
21
22 from collections.abc import Mapping
23
24 else:
25 text_type = unicode
26 string_types = (str, unicode)
27 unichr = unichr
28 int_types = (int, long)
29
30 def iteritems(x):
31 return x.iteritems()
32
33 from collections import Mapping