--- a/python/_harppy.py
+++ b/python/_harppy.py
@@ -34,6 +34,7 @@
 import glob
 import numpy
 import os
+from functools import reduce
 
 try:
     from cStringIO import StringIO
@@ -277,7 +278,7 @@
         return name in self._variable_dict
 
     def __repr__(self):
-        return "<Product variables=%r>" % self._variable_dict.keys()
+        return "<Product variables=%r>" % list(self._variable_dict.keys())
 
     def __str__(self):
         stream = StringIO()
@@ -472,9 +473,9 @@
     This method is Python 2 and Python 3 compatible.
     """
     try:
-        return dictionary.iteritems()
+        return iter(list(dictionary.items()))
     except AttributeError:
-        return dictionary.items()
+        return list(dictionary.items())
 
 
 def _get_py_dimension_type(dimension_type):
