aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/odict.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/markdown/odict.py b/markdown/odict.py
index 8089ece..68c1259 100644
--- a/markdown/odict.py
+++ b/markdown/odict.py
@@ -4,11 +4,6 @@ from . import util
from copy import deepcopy
-def iteritems_compat(d):
- """Return an iterator over the (key, value) pairs of a dictionary.
- Copied from `six` module."""
- return iter(getattr(d, _iteritems)())
-
class OrderedDict(dict):
"""
A dictionary that keeps its keys in the order in which they're inserted.
@@ -106,8 +101,8 @@ class OrderedDict(dict):
return [self[k] for k in self.keyOrder]
def update(self, dict_):
- for k, v in iteritems_compat(dict_):
- self[k] = v
+ for k in dict_:
+ self[k] = dict_[k]
def setdefault(self, key, default):
if key not in self:
@@ -138,7 +133,7 @@ class OrderedDict(dict):
Replaces the normal dict.__repr__ with a version that returns the keys
in their Ordered order.
"""
- return '{%s}' % ', '.join(['%r: %r' % (k, v) for k, v in iteritems_compat(self)])
+ return '{%s}' % ', '.join(['%r: %r' % (k, v) for k, v in self._iteritems()])
def clear(self):
super(OrderedDict, self).clear()