Coverage for /home/martinb/.local/share/virtualenvs/camcops/lib/python3.6/site-packages/markupsafe/_compat.py : 56%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- coding: utf-8 -*-
2"""
3markupsafe._compat
4~~~~~~~~~~~~~~~~~~
6:copyright: 2010 Pallets
7:license: BSD-3-Clause
8"""
9import sys
11PY2 = sys.version_info[0] == 2
13if not PY2:
14 text_type = str
15 string_types = (str,)
16 unichr = chr
17 int_types = (int,)
19 def iteritems(x):
20 return iter(x.items())
22 from collections.abc import Mapping
24else:
25 text_type = unicode
26 string_types = (str, unicode)
27 unichr = unichr
28 int_types = (int, long)
30 def iteritems(x):
31 return x.iteritems()
33 from collections import Mapping