Fix GridOutCursor iteration in py3 PYTHON-310