summaryrefslogtreecommitdiff
path: root/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'compat.py')
-rw-r--r--compat.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/compat.py b/compat.py
index 32c685f5b8..de99eef9c2 100644
--- a/compat.py
+++ b/compat.py
@@ -16,6 +16,8 @@ if sys.version_info < (3,):
return x
def iteritems(d):
return d.iteritems()
+ def itervalues(d):
+ return d.itervalues()
def escape_string(s):
if isinstance(s, unicode):
s = s.encode('ascii')
@@ -44,6 +46,8 @@ else:
return codecs.utf_8_decode(x)[0]
def iteritems(d):
return iter(d.items())
+ def itervalues(d):
+ return iter(d.values())
def charcode_to_c_escapes(c):
rev_result = []
while c >= 256: