diff options
author | David Lord <davidism@gmail.com> | 2018-11-03 15:26:05 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2018-11-03 15:31:24 -0700 |
commit | b41c96e00afd09eca075a98589886c78666d4d33 (patch) | |
tree | bf372cf97c44210717b8954919436023f275627b /src/markupsafe/_compat.py | |
parent | 6247e015ebe0006ee16e69da7aaaba20de18ec94 (diff) | |
download | markupsafe-b41c96e00afd09eca075a98589886c78666d4d33.tar.gz |
add style checks
Diffstat (limited to 'src/markupsafe/_compat.py')
-rw-r--r-- | src/markupsafe/_compat.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/markupsafe/_compat.py b/src/markupsafe/_compat.py index 4d2e2cd..e51d57d 100644 --- a/src/markupsafe/_compat.py +++ b/src/markupsafe/_compat.py @@ -15,12 +15,19 @@ if not PY2: string_types = (str,) unichr = chr int_types = (int,) - iteritems = lambda x: iter(x.items()) + + def iteritems(x): + return iter(x.items()) + from collections.abc import Mapping + else: text_type = unicode string_types = (str, unicode) unichr = unichr int_types = (int, long) - iteritems = lambda x: x.iteritems() + + def iteritems(x): + return x.iteritems() + from collections import Mapping |