Python 3 fix

Python 3 now uses __next__ for iterators (see http://docs.pythonsprints.com/python3_porting/py-porting.html#creating-iterators)