Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/markupsafe/_compat.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author | shellac |
---|---|
date | Thu, 14 May 2020 14:56:58 -0400 |
parents | 26e78fe6e8c4 |
children |
comparison
equal
deleted
inserted
replaced
1:75ca89e9b81c | 2:6af9afd405e9 |
---|---|
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 |