def iterator(d):
    """
    Helper to get and a proper dict iterator with Py2k and Py3k
    """
    try:
        return d.iteritems()
    except __HOLE__:
        return d.items()
dataset/ETHPy150Open samgiles/slumber/slumber/utils.py/iterator