Restore iteration for Python 2