Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/markupsafe/_compat.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
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 |