comparison env/lib/python3.7/site-packages/markupsafe/_compat.py @ 5:9b1c78e6ba9c draft default tip

"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author shellac
date Mon, 01 Jun 2020 08:59:25 -0400
parents 79f47841a781
children
comparison
equal deleted inserted replaced
4:79f47841a781 5:9b1c78e6ba9c
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